cete.dynamicpdf.io.documentwriter
DocumentWriter
- Namespace: ceTe.DynamicPDF.IO
- Assemblies: DynamicPDF.NETFramework40.dll, DynamicPDF.NETStandard20.dll
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
- document: Document
The Document to be drawn.
Properties
CreationDate
Gets document creation time.
public DateTime CreationDate { get; }
Public Property CreationDate As DateTime
Property Value
CurrentSection
Gets the current Section.
public Section CurrentSection { get; }
Public Property CurrentSection As Section
Property Value
Document
Gets the current document.
public Document Document { get; }
Public Property Document As Document
Property Value
FontSubsetter
Gets the current font subsetter.
public FontSubsetter FontSubsetter { get; }
Public Property FontSubsetter As FontSubsetter
Property Value
ModifiedDate
Gets document modified time.
public DateTime ModifiedDate { get; }
Public Property ModifiedDate As DateTime
Property Value
Resources
Gets a resource list for the document.
public abstract DocumentResourceList Resources { get; }
Public MustOverride Property Resources As DocumentResourceList
Property Value
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
- obj: Object
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: Int32
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
- pageNumber: Int32
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
- subsettableFont: IFontSubsettable
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
- data: Byte[]
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
- data: Byte[]
The byte array to output.
- length: Int32
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
- data: Byte[]
The byte array to output.
- start: Int32
The start index of source.
- length: Int32
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
- value: Boolean
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 name)
MustOverride Sub WriteName(name As Byte)
Parameters
- name: Byte
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.
- nameNumber: Int32
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
- name: Byte[]
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
- name: Byte[]
Byte array to output to the document.
- start: Int32
Start of the byte array to output.
- length: Int32
Length of the byte array to output
WriteName(Byte[], String)
Writes a byte array to the document.
public abstract void WriteName(Byte[] name, string nameSuffix)
MustOverride Sub WriteName(name As Byte(), nameSuffix As String)
Parameters
- name: Byte[]
Byte array to output to the document.
- nameSuffix: String
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
- name: String
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
- data: Byte[]
The byte array containing the number to be written.
- start: Int32
Start of number.
- length: Int32
Length of number.
WriteNumber(Int16)
Writes a short to the document.
public abstract void WriteNumber(short value)
MustOverride Sub WriteNumber(value As Short)
Parameters
- value: Int16
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
- value: Int32
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
- value: Single
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
- value: Single
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
- objectNumber: Int32
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: Resource
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
- objectNumber: Int32
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: Resource
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: Resource
Resource to be written to the document.
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
- data: Byte[]
Byte array to output.
- length: Int32
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
- data: Byte[]
Byte array to output.
- start: Int32
Start of output.
- length: Int32
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
- data: Byte[]
Byte array to output.
- length: Int32
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
- text: Byte[]
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
- text: String
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
- text: Byte[]
The text of the text object to write.
- startIndex: Int32
The start index of the supplied byte array.
- count: Int32
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
- text: Byte[]
The text of the text object to write.