Click or drag to resize

ElementBuilder Class

ElementBuilder is used to build new PDF.Elements (e.g. image, text, path, etc) from scratch. In conjunction with ElementWriter, ElementBuilder can be used to create new page content.
Inheritance Hierarchy
SystemObject
  pdftron.PDFElementBuilder

Namespace:  pdftron.PDF
Assembly:  pdftron (in pdftron.dll) Version: 255.255.255.255
Syntax
public sealed class ElementBuilder : IClosable

The ElementBuilder type exposes the following members.

Constructors
  NameDescription
Public methodElementBuilder
Instantiates a new element builder.
Top
Methods
  NameDescription
Public methodArcTo(Double, Double, Double, Double, Double, Double)
Draw an arc with the specified parameters (upper left corner, width, height and angles).
Public methodArcTo(Double, Double, Double, Boolean, Boolean, Double, Double)
Draw an arc from the current point to the end point.
Public methodClose
Public methodClosePath
Closes the current subpath.
Public methodCreateEllipse
Create an ellipse (or circle, if rx == ry) path Element.
Public methodCreateForm(Obj)
Create a Form XObject Element.
Public methodCreateForm(Page)
Create a Form XObject Element using the content of the existing page. This method assumes that the XObject will be used in the same document as the given page. If you need to create the Form XObject in a different document use CreateForm(Page, Doc) method.
Public methodCreateForm(Page, PDFDoc)
Create a Form XObject Element using the content of the existing page. Unlike CreateForm(Page) method, you can use this method to create form in another document.
Public methodCreateGroupBegin
Create e_group_begin Element (i.e. 'q' operator in PDF content stream). The function saves the current graphics state.
Public methodCreateGroupEnd
Create e_group_end Element (i.e. 'Q' operator in PDF content stream). The function restores the previous graphics state.
Public methodCreateImage(Image)
Create a content image Element out of a given document Image.
Public methodCreateImage(Image, Matrix2D)
Create a content image Element out of a given document Image.
Public methodCreateImage(Image, Double, Double, Double, Double)
Create a content image Element out of a given document Image with the lower left corner at (x, y), and scale factors (hscale, vscale).
Public methodCreateRect
Create a rectangle path Element.
Public methodCreateShading
Create a shading Element.
Public methodCreateTextBegin
Start a text block ('BT' operator in PDF content stream).
Public methodCreateTextBegin(Font, Double)
Start a text block ('BT' operator in PDF content stream). The function installs the given font in the current graphics state.
Public methodCreateTextEnd
Ends a text block.
Public methodCreateTextNewLine
Create e_text_new_line Element (i.e. a T* operator in PDF content stream).
Public methodCreateTextNewLine(Double, Double)
Create e_text_new_line Element (i.e. a Td operator in PDF content stream). Move to the start of the next line, offset from the start of the current line by (dx , dy). dx and dy are numbers expressed in unscaled text space units.
Public methodCreateTextRun(Byte)
Create a new text run.
Public methodCreateTextRun(String)
Create a new text run.
Public methodCreateTextRun(Byte, Font, Double)
Create a new text run.
Public methodCreateTextRun(String, Font, Double)
Create a text run using the given font.
Public methodCreateUnicodeTextRun(String)
Create a new Unicode text run.
Public methodCreateUnicodeTextRun(String, Font, Double)
Create a new Unicode text run.
Public methodCurveTo
Draw a Bezier curve from the current point to the given point (x2, y2) using (cx1, cy1) and (cx2, cy2) as control points.
Public methodEllipse
Add an ellipse (or circle, if rx == ry) to the current path as a complete subpath. Setting the current point is not required before using this function.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodLineTo
Draw a line from the current point to the given point.
Public methodMoveTo
Set the current point.
Public methodPathBegin
Create a path Element using given path segment data.
Public methodPathEnd
Finishes building of the path Element.
Public methodRect
Add a rectangle to the current path as a complete subpath. Setting the current point is not required before using this function.
Public methodReset
The function sets the graphics state of this Element to the given value. If 'gs' parameter is not specified or is NULL the function resets the graphics state of this Element to the default graphics state (i.e. the graphics state at the begining of the display list). The function can be used in situations where the same ElementBuilder is used to create content on several pages, XObjects, etc. If the graphics state is not Reset() when moving to a new display list, the new Element will have the same graphics state as the last Element in the previous display list (and this may or may not be your intent). Another use of Reset(gs) is to make sure that two Elements have the graphics state.
Public methodReset(GState)
Reset.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
Analogous to ElementReader, every call to ElementBuilder.Create method destroys the Element currently associated with the builder and all previous Element pointers are invalidated.
See Also