Skip to main content

DocumentWriter

Version: 7.0

cete.dynamicpdf.io.documentwriter

DocumentWriter​

Represents a writer class for a document.

public abstract class DocumentWriter
Public MustInherit Class DocumentWriter

Inheritance: Object → DocumentWriter

Licensing​

This class is a DynamicPDF Generator Professional Edition feature. One of the following licenses is required for non-evaluation usage:

  • DynamicPDF Generator for .NET Professional Edition
  • DynamicPDF Generator for .NET Enterprise Edition
  • DynamicPDF Merger for .NET Professional Edition
  • DynamicPDF Merger for .NET Enterprise Edition
  • DynamicPDF ReportWriter for .NET Professional Edition
  • DynamicPDF ReportWriter for .NET Enterprise Edition
  • DynamicPDF Core Suite for .NET Professional Edition
  • DynamicPDF Core Suite for .NET Enterprise Edition

Constructors​

DocumentWriter(Document)​

Initializes a new instance of the DocumentWriter class.

public DocumentWriter(Document document)
Public Sub New (document As Document)

Parameters​

The Document to be drawn.

Properties​

CurrentSection​

Gets the current Section.

public Section CurrentSection { get; }
Public Property CurrentSection As Section

Property Value​

Section

Document​

Gets the current document.

public Document Document { get; }
Public Property Document As Document

Property Value​

Document

FontSubsetter​

Gets the current font subsetter.

public FontSubsetter FontSubsetter { get; }
Public Property FontSubsetter As FontSubsetter

Property Value​

FontSubsetter

Resources​

Gets a resource list for the document.

public abstract DocumentResourceList Resources { get; }
Public MustOverride Property Resources As DocumentResourceList

Property Value​

DocumentResourceList

Methods​

ClearFontSubsetter()​

Clears the current font subsetter.

public void ClearFontSubsetter()
Sub ClearFontSubsetter()

Draw()​

Initiates the actual drawing of the PDF .

public abstract void Draw()
MustOverride Sub Draw()

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetObjectNumber()​

Gets the indirect object number of the current indirect object.

public abstract int GetObjectNumber()
MustOverride Function GetObjectNumber() As Integer

Returns​

Object number of current indirect object.

GetObjectNumber(Int32)​

Gets the indirect object number of the current indirect object.

public abstract int GetObjectNumber(int offset)
MustOverride Function GetObjectNumber(offset As Integer) As Integer

Parameters​

Offset from the current object.

Returns​

Object number of current indirect object.

GetPageObject(Int32)​

Returns the indirect object number for the given page.

public abstract int GetPageObject(int pageNumber)
MustOverride Function GetPageObject(pageNumber As Integer) As Integer

Parameters​

Page number in the document.

Returns​

The indirect object number for the given page.

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

SetFontSubsetter(IFontSubsettable)​

Sets the current font subsetter.

public FontSubsetter SetFontSubsetter(IFontSubsettable subsettableFont)
Function SetFontSubsetter(subsettableFont As IFontSubsettable) As FontSubsetter

Parameters​

Subsettable font to use for setting the current font subsetter.

Returns​

The current font subsetter.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

Write(Byte[])​

Writes a byte array to the document.

public abstract void Write(Byte[] data)
MustOverride Sub Write(data As Byte())

Parameters​

The byte array to output.

Write(Byte[], Int32)​

Writes a portion of a byte array to the document.

public abstract void Write(Byte[] data, int length)
MustOverride Sub Write(data As Byte(), length As Integer)

Parameters​

The byte array to output.

The length to output.

Write(Byte[], Int32, Int32)​

Writes a portion of a byte array to the document.

public abstract void Write(Byte[] data, int start, int length)
MustOverride Sub Write(data As Byte(), start As Integer, length As Integer)

Parameters​

The byte array to output.

The start index of source.

The length to output.

WriteArrayClose()​

Closes a PDF array on the document

public abstract void WriteArrayClose()
MustOverride Sub WriteArrayClose()

WriteArrayOpen()​

Opens a PDF array on the document.

public abstract void WriteArrayOpen()
MustOverride Sub WriteArrayOpen()

WriteBeginObject()​

Begins a PDF object on the document.

public abstract int WriteBeginObject()
MustOverride Function WriteBeginObject() As Integer

Returns​

WriteBoolean(Boolean)​

Writes a boolean value to the document.

public abstract void WriteBoolean(bool value)
MustOverride Sub WriteBoolean(value As Boolean)

Parameters​

The boolean value to output.

WriteDictionaryClose()​

Closes a dictionary entry on the document.

public abstract void WriteDictionaryClose()
MustOverride Sub WriteDictionaryClose()

WriteDictionaryOpen()​

Opens a dictionary entry on the document.

public abstract void WriteDictionaryOpen()
MustOverride Sub WriteDictionaryOpen()

WriteEndObject()​

Closes a PDF object on the document.

public abstract void WriteEndObject()
MustOverride Sub WriteEndObject()

WriteName(Byte)​

Writes a byte to the document.

public abstract void WriteName(byte nameByte)
MustOverride Sub WriteName(nameByte As Byte)

Parameters​

Byte to output to the document.

WriteName(Byte, Int32)​

Writes a byte to the document.

public abstract void WriteName(byte nameCharacter, int nameNumber)
MustOverride Sub WriteName(nameCharacter As Byte, nameNumber As Integer)

Parameters​

  • nameCharacter: Byte

Byte to output to the document.

Integer to output to the document.

WriteName(Byte[])​

Writes a byte array to the document.

public abstract void WriteName(Byte[] name)
MustOverride Sub WriteName(name As Byte())

Parameters​

Byte array to output to the document.

WriteName(Byte[], Int32, Int32)​

Writes a portion of the byte array to the document.

public abstract void WriteName(Byte[] name, int start, int length)
MustOverride Sub WriteName(name As Byte(), start As Integer, length As Integer)

Parameters​

Byte array to output to the document.

Start of the byte array to output.

Length of the byte array to output

WriteName(Byte[], String)​

Writes a byte array to the document.

public abstract void WriteName(Byte[] name, string nameSufix)
MustOverride Sub WriteName(name As Byte(), nameSufix As String)

Parameters​

Byte array to output to the document.

Suffix to output to the document.

WriteName(String)​

Writes a string to the document.

public abstract void WriteName(string name)
MustOverride Sub WriteName(name As String)

Parameters​

String to output to the document.

WriteNull()​

Writes a null value to the document.

public abstract void WriteNull()
MustOverride Sub WriteNull()

WriteNumber(Byte[], Int32, Int32)​

Writes a number to the document.

public abstract void WriteNumber(Byte[] data, int start, int length)
MustOverride Sub WriteNumber(data As Byte(), start As Integer, length As Integer)

Parameters​

The byte array containing the number to be written.

Start of number.

Length of number.

WriteNumber(Int16)​

Writes a short to the document.

public abstract void WriteNumber(short value)
MustOverride Sub WriteNumber(value As Short)

Parameters​

The value to write.

WriteNumber(Int32)​

Writes an integer to the document.

public abstract void WriteNumber(int value)
MustOverride Sub WriteNumber(value As Integer)

Parameters​

The value to write.

WriteNumber(Single)​

Writes a float to the document.

public abstract void WriteNumber(float value)
MustOverride Sub WriteNumber(value As Single)

Parameters​

The value to write.

WriteNumber0()​

Writes the number 0 to the document.

public abstract void WriteNumber0()
MustOverride Sub WriteNumber0()

WriteNumber1()​

Writes the number 1 to the document.

public abstract void WriteNumber1()
MustOverride Sub WriteNumber1()

WriteNumberColor(Single)​

Writes a color value to the document.

public abstract void WriteNumberColor(float value)
MustOverride Sub WriteNumberColor(value As Single)

Parameters​

Color value to write.

WriteNumberNeg1()​

Writes a negative 1 to the document.

public abstract void WriteNumberNeg1()
MustOverride Sub WriteNumberNeg1()

WriteReference(Int32)​

Writes a resource reference to the document.

public abstract void WriteReference(int objectNumber)
MustOverride Sub WriteReference(objectNumber As Integer)

Parameters​

Resource object number or page number to be written to the document.

WriteReference(Resource)​

Writes a reference to the supplied resource to the document.

public void WriteReference(Resource resource)
Sub WriteReference(resource As Resource)

Parameters​

Resource to be written to the document.

WriteReferenceShallow(Int32)​

Writes a shallow resource reference to the document.

public abstract void WriteReferenceShallow(int objectNumber)
MustOverride Sub WriteReferenceShallow(objectNumber As Integer)

Parameters​

Resource object number or page number to be written to the document.

WriteReferenceShallow(Resource)​

Writes a shallow reference to the supplied resource to the document.

public void WriteReferenceShallow(Resource resource)
Sub WriteReferenceShallow(resource As Resource)

Parameters​

Resource to be written to the document.

WriteReferenceUnique(Resource)​

Writes a unique reference to the supplied resource to the document.

public void WriteReferenceUnique(Resource resource)
Sub WriteReferenceUnique(resource As Resource)

Parameters​

Resource to be written to the document.

WriteStream(Buffer, Int32, Int32, Int32, Int32, Int32)​

Writes a buffer to the document.

public abstract void WriteStream(Buffer buffer, int startIndex, int startPosition, int stopIndex, int stopPosition, int length)
MustOverride Sub WriteStream(buffer As Buffer, startIndex As Integer, startPosition As Integer, stopIndex As Integer, stopPosition As Integer, length As Integer)

Parameters​

Buffer to be written to the document.

The Index to start writing.

The Position to start writing.

The Index to stop writing.

The Position to stop writing.

The length of the buffer to write.

WriteStream(Byte[], Int32)​

Writes a PDF stream object to the document.

public abstract void WriteStream(Byte[] data, int length)
MustOverride Sub WriteStream(data As Byte(), length As Integer)

Parameters​

Byte array to output.

Length of output.

WriteStream(Byte[], Int32, Int32)​

Writes a PDF stream object to the document.

public abstract void WriteStream(Byte[] data, int start, int length)
MustOverride Sub WriteStream(data As Byte(), start As Integer, length As Integer)

Parameters​

Byte array to output.

Start of output.

Length of output.

WriteStreamWithCompression(Byte[], Int32)​

Writes a PDF stream object to the document.

public abstract int WriteStreamWithCompression(Byte[] data, int length)
MustOverride Function WriteStreamWithCompression(data As Byte(), length As Integer) As Integer

Parameters​

Byte array to output.

Length of output.

Returns​

Size of stream after compression.

WriteText(Byte[])​

Writes a PDF text object to the document.

public abstract void WriteText(Byte[] text)
MustOverride Sub WriteText(text As Byte())

Parameters​

The text of the text object to write.

WriteText(String)​

Writes a PDF text object to the document.

public abstract void WriteText(string text)
MustOverride Sub WriteText(text As String)

Parameters​

The text of the text object to write.

WriteTextRawWithoutEncryption(Byte[], Int32, Int32)​

Writes a raw PDF text object to the document without any encryption.

public abstract void WriteTextRawWithoutEncryption(Byte[] text, int startIndex, int count)
MustOverride Sub WriteTextRawWithoutEncryption(text As Byte(), startIndex As Integer, count As Integer)

Parameters​

The text of the text object to write.

The start index of the supplied byte array.

The number of total bytes to write.

WriteTextWithoutEncryption(Byte[])​

Writes a PDF text object to the document without any encryption.

public abstract void WriteTextWithoutEncryption(Byte[] text)
MustOverride Sub WriteTextWithoutEncryption(text As Byte())

Parameters​

The text of the text object to write.

See Also​

ceTe.DynamicPDF.IO