Click or drag to resize

ElementWriter Class

ElementWriter can be used to assemble and write new content to a page, Form XObject, Type3 Glyph stream, pattern stream, or any other content stream.
Inheritance Hierarchy
SystemObject
  pdftron.PDFElementWriter

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

The ElementWriter type exposes the following members.

Constructors
  NameDescription
Public methodElementWriter
Instantiates a new element writer.
Top
Methods
  NameDescription
Public methodBegin(Page)
Begin writing to the given page. By default, new content will be appended to the page, as foreground graphics. It is possible to add new page content as background graphics by setting the second parameter in begin method to 'true' (e.g. writer.Begin(page, true)).
Public methodBegin(SDFDoc)
Begin writing an Element sequence to a new stream. Use this function to write Elements to a content stream other than the page. For example, you can create Form XObjects (See Section '4.9 Form XObjects' in PDF Reference for more details) pattern streams, Type3 font glyph streams, etc.
Public methodBegin(Obj, Boolean)
Begin.
Public methodBegin(Page, ElementWriterWriteMode)
Begin writing to the given page.
Public methodBegin(SDFDoc, Boolean)
Begin.
Public methodBegin(Obj, Boolean, Obj)
Begin writing an Element sequence to a stream. Use this function to write Elements to a content stream which will replace an existing content stream in an object passed as a parameter.
Public methodBegin(Page, ElementWriterWriteMode, Boolean)
By default, new content will be appended to the page, as foreground graphics. It is possible to add new page content as background graphics by setting the second parameter in begin method to 'true' (e.g. writer.Begin(page, true)).
Public methodBegin(Page, ElementWriterWriteMode, Boolean, Boolean)
Begin writing to the given page.
Public methodBegin(Page, ElementWriterWriteMode, Boolean, Boolean, Obj)
Begin writing to the given page. By default, new content will be appended to the page, as foreground graphics. It is possible to add new page content as background graphics by setting the second parameter in begin method to 'true' (e.g. writer.Begin(page, true)).
Public methodClose
Public methodEnd
Finish writing to a page.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodFlush
The Flush method flushes all pending Element writing operations. This method is typically only required to be called when intermixing direct content writing (i.e. WriteBuffer/WriteString) with Element writing.
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 methodSetDefaultGState
This method is used to initialize ElementWriter state with the state of a given ElementReader. This can be used to avoid incorrectly writing inherited GState attributes.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodWriteElement
Writes the Element to the content stream.
Public methodWritePlacedElement
A utility function that surrounds the given Element with a graphics state Save/Restore Element (i.e. in PDF content stream represented as 'q element Q'). The function is equivalent to calling WriteElement three times: WriteElement(eSave); WriteElement(element); WriteElement(eRestore); where eSave is 'e_group_begin' and eRestore is 'e_group_end' Element The function is useful when XObjects such as Images and Forms are drawn on the page.
Public methodWriteString
Writes an arbitrary buffer to the content stream. This function can be used to insert comments, inline-image data, and chunks of arbitrary content to the output stream.
Top
See Also