DynamicPDF by ceTe Software

com.cete.dynamicpdf.io
Class DocumentWriter

java.lang.Object
  extended by com.cete.dynamicpdf.io.DocumentWriter

public abstract class DocumentWriter
extends java.lang.Object

Represents a writer class for a document.

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


Method Summary
 void clearFontSubsetter()
          Clears the current font subsetter.
 java.util.Date getCreationDate()
          Gets the document creation time.
 Section getCurrentSection()
          Gets the current section.
 Document getDocument()
          Gets the current document.
 FontSubsetter getFontSubsetter()
          Gets the current font subsetter.
 java.util.Date getModifiedDate()
          Gets the document modified time.
abstract  int getObjectNumber()
          Gets the indirect object number of the current indirect object.
abstract  int getObjectNumber(int offset)
          Gets the indirect object number of the current indirect object.
abstract  int getPageObject(int pageNumber)
          Gets the indirect object number for the given page.
abstract  DocumentResourceList getResources()
          Gets a collection of resources.
 FontSubsetter setFontSubsetter(IFontSubsettable subsettableFont)
          Sets the current font subsetter.
abstract  void write(byte[] data)
          Writes a byte array to the document.
abstract  void write(byte[] data, int length)
          Writes a portion of a byte array to the output stream.
abstract  void write(byte[] data, int start, int length)
          Writes a portion of a byte array to the output stream.
abstract  void writeArrayClose()
          Closes a PDF array on the document
abstract  void writeArrayOpen()
          Opens a PDF array on the document.
abstract  int writeBeginObject()
          Begins a PDF object and send it to the output stream.
abstract  void writeBoolean(boolean value)
          Writes a boolean value to the document.
abstract  void writeDictionaryClose()
          Closes a dictionary entry on the document.
abstract  void writeDictionaryOpen()
          Opens a dictionary entry on the document.
abstract  void writeEndObject()
          Ends a PDF object and send it to the output stream.
abstract  void writeName(byte nameByte)
          Writes a byte to the document.
abstract  void writeName(byte[] name)
          Writes a byte array to the document.
abstract  void writeName(byte[] name, int start, int length)
          Writes a portion of the byte array to the document.
abstract  void writeName(byte[] name, java.lang.String nameSufix)
          Writes a byte array to the document.
abstract  void writeName(byte nameCharacter, int nameNumber)
          Writes a byte to the document.
abstract  void writeName(java.lang.String name)
          Writes a String to the document.
abstract  void writeNull()
          Writes a null value to the document.
abstract  void writeNumber(byte[] data, int start, int length)
          Writes a number to the document.
abstract  void writeNumber(float value)
          Writes a float value to the document.
abstract  void writeNumber(int value)
          Writes an integer to the document.
abstract  void writeNumber(short value)
          Writes a short value to the document.
abstract  void writeNumber0()
          Writes the number 0 to the document.
abstract  void writeNumber1()
          Writes the number 1 to the document.
abstract  void writeNumberColor(float value)
          Writes a color value to the document.
abstract  void writeNumberNeg1()
          Writes a negative 1 to the document.
abstract  void writeReference(int objectNumber)
          Writes a resource reference to the document.
 void writeReference(Resource resource)
          Writes a reference to the supplied resource to the document.
abstract  void writeReferenceShallow(int objectNumber)
          Writes a shallow resource reference to the document.
 void writeReferenceShallow(Resource resource)
          Writes a shallow reference to the supplied resource to the document.
 void writeReferenceUnique(Resource resource)
          Writes a unique reference to the supplied resource to the document.
abstract  void writeStream(byte[] data, int length)
          Writes a PDF stream object to the output stream.
abstract  void writeStream(byte[] data, int start, int length)
          Writes a PDF stream object to the document.
abstract  int writeStreamWithCompression(byte[] data, int length)
          Writes a PDF stream object to the document.
abstract  void writeText(byte[] text)
          Writes a PDF text object to the document.
abstract  void writeText(java.lang.String text)
          Writes a PDF text object to the document.
abstract  void writeTextRawWithoutEncryption(byte[] text, int startIndex, int count)
          Writes a raw PDF text object to the document without any encryption.
abstract  void writeTextWithoutEncryption(byte[] text)
          Writes a PDF text object to the document without any encryption.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getResources

public abstract DocumentResourceList getResources()
Gets a collection of resources.

Returns:
the DocumentResourceList object.

getCurrentSection

public Section getCurrentSection()
Gets the current section.

Returns:
currentSection.

getDocument

public Document getDocument()
Gets the current document.

Returns:
the current Document object.

getFontSubsetter

public FontSubsetter getFontSubsetter()
Gets the current font subsetter.

Returns:
Current font subsetter.
See Also:
FontSubsetter

getObjectNumber

public abstract int getObjectNumber()
Gets the indirect object number of the current indirect object.

Returns:
Object number of current indirect object.

getObjectNumber

public abstract int getObjectNumber(int offset)
Gets the indirect object number of the current indirect object.

Parameters:
offset - Offset from the current object.
Returns:
Object number of current indirect object.

getPageObject

public abstract int getPageObject(int pageNumber)
Gets the indirect object number for the given page.

Parameters:
pageNumber - Page number in the document.
Returns:
The indirect object number for the given page.

write

public abstract void write(byte[] data)
Writes a byte array to the document.

Parameters:
data - The byte array to output.

write

public abstract void write(byte[] data,
                           int length)
Writes a portion of a byte array to the output stream.

Parameters:
data - byte array to output.
length - integer length of output.

write

public abstract void write(byte[] data,
                           int start,
                           int length)
Writes a portion of a byte array to the output stream.

Parameters:
data - byte array to output.
start - int value indicating start of output.
length - integer length of output.

writeArrayOpen

public abstract void writeArrayOpen()
Opens a PDF array on the document.


writeArrayClose

public abstract void writeArrayClose()
Closes a PDF array on the document


writeBeginObject

public abstract int writeBeginObject()
Begins a PDF object and send it to the output stream.

Returns:
The int value specifying PDF object number of the new object.

writeBoolean

public abstract void writeBoolean(boolean value)
Writes a boolean value to the document.

Parameters:
value - The boolean value to output.

writeDictionaryOpen

public abstract void writeDictionaryOpen()
Opens a dictionary entry on the document.


writeDictionaryClose

public abstract void writeDictionaryClose()
Closes a dictionary entry on the document.


writeEndObject

public abstract void writeEndObject()
Ends a PDF object and send it to the output stream.


writeName

public abstract void writeName(java.lang.String name)
Writes a String to the document.

Parameters:
name - String to output to the document.

writeName

public abstract void writeName(byte[] name)
Writes a byte array to the document.

Parameters:
name - Byte array to output to the document.

writeName

public abstract void writeName(byte[] name,
                               java.lang.String nameSufix)
Writes a byte array to the document.

Parameters:
name - Byte array to output to the document.
nameSufix - Suffix to output to the document.

writeName

public abstract void writeName(byte nameByte)
Writes a byte to the document.

Parameters:
nameByte - Byte to output to the document.

writeName

public abstract void writeName(byte nameCharacter,
                               int nameNumber)
Writes a byte to the document.

Parameters:
nameCharacter - Byte to output to the document.
nameNumber - Integer to output to the document.

writeName

public abstract void writeName(byte[] name,
                               int start,
                               int length)
Writes a portion of the byte array to the document.

Parameters:
name - Byte array to output to the document.
start - Start of the byte array to output.
length - Length of the byte array to output.

writeReference

public abstract void writeReference(int objectNumber)
Writes a resource reference to the document.

Parameters:
objectNumber - Resource object number or page number to be written to the document.

writeReferenceShallow

public abstract void writeReferenceShallow(int objectNumber)
Writes a shallow resource reference to the document.

Parameters:
objectNumber - Resource object number or page number to be written to the document.

getCreationDate

public java.util.Date getCreationDate()
Gets the document creation time.

Returns:
the document creation time.

getModifiedDate

public java.util.Date getModifiedDate()
Gets the document modified time.

Returns:
the document modified time.

writeNumber0

public abstract void writeNumber0()
Writes the number 0 to the document.


writeNumber1

public abstract void writeNumber1()
Writes the number 1 to the document.


writeNumberNeg1

public abstract void writeNumberNeg1()
Writes a negative 1 to the document.


writeNumber

public abstract void writeNumber(int value)
Writes an integer to the document.

Parameters:
value - The value to write.

writeNumber

public abstract void writeNumber(short value)
Writes a short value to the document.

Parameters:
value - The value to write.

writeNumber

public abstract void writeNumber(byte[] data,
                                 int start,
                                 int length)
Writes a number to the document.

Parameters:
data - The byte array containing the number to be written.
start - Start of number.
length - Length of number.

writeNumber

public abstract void writeNumber(float value)
Writes a float value to the document.

Parameters:
value - The float value to write.

writeNumberColor

public abstract void writeNumberColor(float value)
Writes a color value to the document.

Parameters:
value - Color value to write.

writeNull

public abstract void writeNull()
Writes a null value to the document.


writeStream

public abstract void writeStream(byte[] data,
                                 int length)
Writes a PDF stream object to the output stream.

Parameters:
data - the byte array to output.
length - the int value containing length of output.

writeStream

public abstract void writeStream(byte[] data,
                                 int start,
                                 int length)
Writes a PDF stream object to the document.

Parameters:
data - Byte array to output.
start - Start of output.
length - Length of output.

writeStreamWithCompression

public abstract int writeStreamWithCompression(byte[] data,
                                               int length)
Writes a PDF stream object to the document.

Parameters:
data - Byte array to output.
length - Length of output.
Returns:
Size of stream after compression.

writeText

public abstract void writeText(java.lang.String text)
Writes a PDF text object to the document.

Parameters:
text - The String value indicating text of the text object to write.

writeText

public abstract void writeText(byte[] text)
Writes a PDF text object to the document.

Parameters:
text - The byte array containing text of the text object to write.

writeTextRawWithoutEncryption

public abstract void writeTextRawWithoutEncryption(byte[] text,
                                                   int startIndex,
                                                   int count)
Writes a raw PDF text object to the document without any encryption.

Parameters:
text - The text of the text object to write.
startIndex - The start index of the supplied byte array.
count - The number of total bytes to write.

writeTextWithoutEncryption

public abstract void writeTextWithoutEncryption(byte[] text)
Writes a PDF text object to the document without any encryption.

Parameters:
text - The text of the text object to write.

clearFontSubsetter

public void clearFontSubsetter()
Clears the current font subsetter.


setFontSubsetter

public FontSubsetter setFontSubsetter(IFontSubsettable subsettableFont)
Sets the current font subsetter.

Parameters:
subsettableFont - Subsettable font to use for setting the current font subsetter.
Returns:
The current font subsetter.
See Also:
IFontSubsettable, FontSubsetter

writeReference

public void writeReference(Resource resource)
Writes a reference to the supplied resource to the document.

Parameters:
resource - Resource to be written to the document.

writeReferenceUnique

public void writeReferenceUnique(Resource resource)
Writes a unique reference to the supplied resource to the document.

Parameters:
resource - Resource to be written to the document.

writeReferenceShallow

public void writeReferenceShallow(Resource resource)
Writes a shallow reference to the supplied resource to the document.

Parameters:
resource - Resource to be written to the document.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software