DynamicPDF by ceTe Software

com.cete.dynamicpdf
Class Document

java.lang.Object
  extended by com.cete.dynamicpdf.Document
Direct Known Subclasses:
MergeDocument

public class Document
extends java.lang.Object

Represents a PDF Document. This is the primary class used to generate the PDF document. It represents a single PDF Document and is made up of Pages and Outlines. The document can have a Security object associated with it to control document security and encryption. The document can be output to any object derived from the java.io.OutputStream class that supports writing and can easily be integrated with JSP/SERVLET to stream the document to any Web Server's HTTP output stream.

Licensing:
This class is a DynamicPDF Generator Community Edition feature. Some properties require additional licensing and are noted accordingly.

View Example

See Also:
Security, OutputStream

Constructor Summary
Document()
          Initializes a new instance of the Document class.
 
Method Summary
static boolean addLicense(java.lang.String licenseKey)
          Adds the license to the product.
 void certify(java.lang.String fieldName, Certificate certificate, boolean timestamp, CertifyingPermission permission)
          Certifies with signing and Timestamping the document digitally.
 void certify(java.lang.String fieldName, Certificate certificate, CertifyingPermission permission)
          Certifies with signing the document digitally.
 void certify(java.lang.String fieldName, Certificate certificate, TimestampServer timestampServer, CertifyingPermission permission)
          Certifies with signing and Timestamping the document digitally.
 byte[] draw()
          Outputs the generated Document to a byte array.
 void draw(java.io.OutputStream outStream)
          Outputs the generated Document to the given OutputStream object.
 void draw(java.lang.String filePath)
          Outputs the generated Document to a file.
protected  void drawRootEntries(DocumentWriter writer)
          Outputs the catalog entries to the DocumentWriter.
 void drawToWeb(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.OutputStream sOut)
          Outputs the generated Document to the given HttpServletResponse object.
 void drawToWeb(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.OutputStream sOut, boolean allowBrowserCaching)
          Outputs the generated Document to the given HttpServletResponse object.
 void drawToWeb(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.OutputStream sOut, java.lang.String downloadAsFileName)
          Outputs the generated Document to the given HttpServletResponse object.
 void drawToWeb(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.io.OutputStream sOut, java.lang.String downloadAsFileName, boolean forceDownload)
          Outputs the generated Document to the given HttpServletResponse object.
static Document fromHtml(java.lang.String filePath, PageDimensions dimensions, HtmlAreaPadding padding)
           
static Document fromHtml(java.lang.String filePath, PageDimensions dimensions, HtmlAreaPadding padding, java.net.URI baseHref)
           
static Document fromHtml(java.lang.String filePath, PageDimensions dimensions, java.net.URI baseHref)
           
static Document fromHtml(java.net.URI uri, PageDimensions dimensions, HtmlAreaPadding padding)
           
static Document fromHtml(java.net.URI uri, PageDimensions dimensions, HtmlAreaPadding padding, java.net.URI baseHref)
           
static Document fromHtml(java.net.URI uri, PageDimensions dimensions, java.net.URI baseHref)
           
 java.lang.String getAuthor()
          Gets a value indicating the author of the Document.
 int getCompressionLevel()
          Gets a value indicating the compression level of the Document.
 java.lang.String getCreator()
          Gets a value indicating the creator of the Document.
 CustomPropertyList getCustomProperties()
          Gets a value indicating the custom properties of the Document.
static PdfFormat getDefaultPdfFormat()
          Deprecated. as of DynamicPDF v10.0.0 replaced by GlobalSettings.getDefaultOutputPdfFormat()
static PdfVersion getDefaultPdfVersion()
          Deprecated. as of DynamicPDF v10.0.0 replaced by GlobalSettings.getDefaultOutputPdfVersion()
 EmbeddedFileList getEmbeddedFiles()
          Gets an EmbeddedFileList containing the EmbeddedFile for the document.
 Form getForm()
          Gets a form object for the PDF document.
 FormFlatteningOptions getFormFlattening()
          Deprecated. as of DynamicPDF v8.0.0 replaced by Form.getOutput()
 int getInitialPage()
          Gets a value indicating the initial page of the Document.
 PageLayout getInitialPageLayout()
          Gets a value indicating the intial layout of the Document.
 PageMode getInitialPageMode()
          Gets a value indicating the initial page mode of the Document.
 PageZoom getInitialPageZoom()
          Gets a value indicating the initial zoom of the Document.
 DocumentJavaScriptList getJavaScripts()
          Gets a DocumentJavaScriptList containing the JavaScript entries for that document.
 java.lang.String getKeywords()
          Gets a value indicating the keywords of the Document.
 java.lang.String getLanguage()
          Gets a value indicating the language of the Document.
 DocumentOptimization getOptimization()
          Gets the document optimization.
 OutlineList getOutlines()
          Gets an OutlineList object that represents the top level outlines of the Document.
 OutputIntentList getOutputIntents()
          Gets the output intent list for the Document.
 DocumentPackage getPackage()
          Gets the document package.
 PageList getPages()
          Gets a PageList object that represent the pages of the Document.
 PdfFormat getPdfFormat()
          Gets a PdfFormat object that represents the format for the PDF document.
 PdfVersion getPdfVersion()
          Gets the PDF version of the PDF document.
 PdfXVersion getPdfXVersion()
          Gets the PDF/X version for the Document.
 java.lang.String getProducer()
          Gets a value indicating the producer of the Document.
static int getProductBuildNumber()
          Gets the product build number.
static java.lang.String getProductVersion()
          Gets the product version.
 DocumentReaderEvents getReaderEvents()
          Gets the reader events of the document.
 SectionList getSections()
          Gets a SectionList object for the Document.
 Security getSecurity()
          Gets an object to control the security and encryption of the Document.
 Template getStampTemplate()
          Gets a Template object for the Document.
 java.lang.String getSubject()
          Gets a value indicating the subject of the Document.
 TagOptions getTag()
          Gets a value indicating whether document is tagged.
 Template getTemplate()
          Gets a Template object for the Document.
 java.lang.String getTitle()
          Gets a value indicating the title of the Document.
 Trapped getTrapped()
          Gets a value indicating if trapping information is present in the Document.
 ViewerPreferences getViewerPreferences()
          Gets a ViewerPreferences object that represent the viewer preferences of the Document.
 XmpMetadata getXmpMetadata()
          Gets the xmp metadata.
 void requireLicense()
          Causes the evaluation watermark to display if product is not adequately licensed.
 void requireLicense(int level)
          Causes the evaluation watermark to display if product is not adequately licensed.
 void setAuthor(java.lang.String author)
          Sets a value indicating the author of the Document.
 void setCompressionLevel(int compressionLevel)
          Sets a value indicating the compression level of the Document.
 void setCreator(java.lang.String creator)
          Sets a value indicating the creator of the Document.
static void setDefaultPdfFormat(PdfFormat pdfFormat)
          Deprecated. as of DynamicPDF v10.0.0 replaced by GlobalSettings.setDefaultOutputPdfFormat(PdfFormat)
static void setDefaultPdfVersion(PdfVersion pdfVersion)
          Deprecated. as of DynamicPDF v10.0.0 replaced by GlobalSettings.setDefaultOutputPdfVersion(PdfVersion)
 void setFormFlattening(FormFlatteningOptions value)
          Deprecated. as of DynamicPDF v8.0.0 replaced by Form.setOutput(FormOutput)
 void setInitialPage(int initialPage)
          Sets a value indicating the initial page of the Document.
 void setInitialPageLayout(PageLayout value)
          Sets a value indicating the intial layout of the Document.
 void setInitialPageMode(PageMode initialPageMode)
          Sets a value indicating the initial page mode of the Document.
 void setInitialPageZoom(PageZoom initialPageZoom)
          Sets a value indicating the initial zoom of the Document.
 void setKeywords(java.lang.String keywords)
          Sets a value indicating the keywords of the Document.
 void setLanguage(java.lang.String value)
          sets a value indicating the language of the Document.
 void setOptimization(DocumentOptimization value)
          Sets the document optimization.
 void setPackage(DocumentPackage value)
          Sets the document package.
 void setPdfFormat(PdfFormat pdfFormat)
          Sets a PdfFormat object for the Document.
 void setPdfVersion(PdfVersion ver)
          Sets the PDF version of the PDF document.
 void setPdfXVersion(PdfXVersion value)
          sets the PDF/X version for the Document.
 void setProducer(java.lang.String producer)
          Sets a value indicating the producer of the Document.
 void setSecurity(Security security)
          Sets an object to control the security and encryption of the Document.
 void setStampTemplate(Template template)
          Sets a Template object for the Document.
 void setSubject(java.lang.String subject)
          Sets a value indicating the subject of the Document.
 void setTag(TagOptions tagOptions)
          Gets a value indicating whether document is tagged.
 void setTemplate(Template template)
          Sets a Template object for the Document.
 void setTitle(java.lang.String title)
          Sets a value indicating the title of the Document.
 void setTrapped(Trapped value)
          Sets a value indicating if trapping information is present in the Document.
 void setXmpMetadata(XmpMetadata xmp)
          Sets the xmp metadata.
 void sign(java.lang.String fieldName, Certificate certificate)
          Sign this document digitally.
 void sign(java.lang.String fieldName, Certificate certificate, boolean timestamp)
          Digitally sign this document with Timestamping.
 void sign(java.lang.String fieldName, Certificate certificate, TimestampServer timestampServer)
          Digitally sign this document with Timestamping.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Document

public Document()
Initializes a new instance of the Document class.

Method Detail

getProductBuildNumber

public static int getProductBuildNumber()
Gets the product build number.

Returns:
the product build number.

getProductVersion

public static java.lang.String getProductVersion()
Gets the product version.

Returns:
the product version.

addLicense

public static boolean addLicense(java.lang.String licenseKey)
Adds the license to the product.

Parameters:
licenseKey - A string representing license key provided to you by ceTe Software.
Returns:
the license status.

fromHtml

public static Document fromHtml(java.lang.String filePath,
                                PageDimensions dimensions,
                                HtmlAreaPadding padding)

fromHtml

public static Document fromHtml(java.lang.String filePath,
                                PageDimensions dimensions,
                                java.net.URI baseHref)

fromHtml

public static Document fromHtml(java.lang.String filePath,
                                PageDimensions dimensions,
                                HtmlAreaPadding padding,
                                java.net.URI baseHref)

fromHtml

public static Document fromHtml(java.net.URI uri,
                                PageDimensions dimensions,
                                HtmlAreaPadding padding)

fromHtml

public static Document fromHtml(java.net.URI uri,
                                PageDimensions dimensions,
                                java.net.URI baseHref)

fromHtml

public static Document fromHtml(java.net.URI uri,
                                PageDimensions dimensions,
                                HtmlAreaPadding padding,
                                java.net.URI baseHref)

draw

public byte[] draw()
Outputs the generated Document to a byte array. View Example

Returns:
byte array containing the document data.

draw

public void draw(java.lang.String filePath)
Outputs the generated Document to a file. View Example

Throws:
GeneratorException - If specified path is incorrect.
Parameters:
filePath - the String representing the file path to store the Document.

draw

public void draw(java.io.OutputStream outStream)
Outputs the generated Document to the given OutputStream object.

Throws:
GeneratorException - If specified stream is incorrect. View Example
Parameters:
outStream - the OutputStream object that receive the Document output.

drawToWeb

public void drawToWeb(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      java.io.OutputStream sOut)
Outputs the generated Document to the given HttpServletResponse object. View Example

Throws:
GeneratorException - If generated PDF can't be write to specified stream.
Parameters:
request - the HttpServletRequest object that contains the client request information.
response - the HttpServletResponse object that receive the Document output.
sOut - the OutputStream object that receive the Document output.

drawToWeb

public void drawToWeb(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      java.io.OutputStream sOut,
                      boolean allowBrowserCaching)
Outputs the generated Document to the given HttpServletResponse object. View Example

Throws:
GeneratorException - If generated PDF can't be write to specified stream.
Parameters:
request - the HttpServletRequest object that contains the client request information.
response - the HttpServletResponse object that receive the Document output.
sOut - the OutputStream object that receive the Document output.
allowBrowserCaching - the boolean value which specifies if the browser should be allowed to cache the Document.

drawToWeb

public void drawToWeb(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      java.io.OutputStream sOut,
                      java.lang.String downloadAsFileName)
Outputs the generated Document to the given HttpServletResponse object. View Example

Throws:
GeneratorException - If generated PDF can't be write to specified stream.
Parameters:
request - the HttpServletRequest object that contains the client request information.
response - the HttpServletResponse object that receive the Document output.
sOut - the OutputStream object that receive the Document output.
downloadAsFileName - the String which specifies the file name of the document if it is downloaded.

drawToWeb

public void drawToWeb(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response,
                      java.io.OutputStream sOut,
                      java.lang.String downloadAsFileName,
                      boolean forceDownload)
Outputs the generated Document to the given HttpServletResponse object. View Example

Throws:
GeneratorException - If generated PDF can't be write to specified stream.
Parameters:
request - the HttpServletRequest object that contains the client request information.
response - the HttpServletResponse object that receive the Document output.
sOut - the OutputStream object that receive the Document output.
downloadAsFileName - the String which specifies the file name of the document if it is downloaded.
forceDownload - the boolean value which specifies if the Save As dialog should appear.

requireLicense

public void requireLicense(int level)
Causes the evaluation watermark to display if product is not adequately licensed.

Parameters:
level - the evaluation watermark to display if product is not adequately licensed.

requireLicense

public void requireLicense()
Causes the evaluation watermark to display if product is not adequately licensed.


sign

public void sign(java.lang.String fieldName,
                 Certificate certificate)
Sign this document digitally.

Parameters:
fieldName - Field name of the signature.
certificate - Reference of type Certificate
See Also:
View Example

sign

public void sign(java.lang.String fieldName,
                 Certificate certificate,
                 boolean timestamp)
Digitally sign this document with Timestamping.

Parameters:
fieldName - Field name of the signature.
certificate - Reference of type Certificate
timestamp - Timestamp the document using details from the certificate.
See Also:
Certificate

sign

public void sign(java.lang.String fieldName,
                 Certificate certificate,
                 TimestampServer timestampServer)
Digitally sign this document with Timestamping.

Parameters:
fieldName - Field name of the signature.
certificate - Reference of type Certificate.
timestampServer - Reference of type TimestampServer.
See Also:
Certificate, TimestampServer

certify

public void certify(java.lang.String fieldName,
                    Certificate certificate,
                    CertifyingPermission permission)
Certifies with signing the document digitally.

Parameters:
fieldName - Field name of the signature.
certificate - Reference of type Certificate
permission - CertifyingPermission for the signature.
See Also:
Certificate, CertifyingPermission

certify

public void certify(java.lang.String fieldName,
                    Certificate certificate,
                    TimestampServer timestampServer,
                    CertifyingPermission permission)
Certifies with signing and Timestamping the document digitally.

Parameters:
fieldName - Field name of the signature.
certificate - Reference of type Certificate
timestampServer - Reference of type TimestampServer.
permission - CertifyingPermission for the signature.
See Also:
Certificate, TimestampServer, CertifyingPermission

certify

public void certify(java.lang.String fieldName,
                    Certificate certificate,
                    boolean timestamp,
                    CertifyingPermission permission)
Certifies with signing and Timestamping the document digitally.

Parameters:
fieldName - Field name of the signature.
certificate - Reference of type Certificate
timestamp - Timestamp the document using details from the certificate.
permission - CertifyingPermission for the signature.
See Also:
Certificate, CertifyingPermission

getDefaultPdfFormat

public static PdfFormat getDefaultPdfFormat()
Deprecated. as of DynamicPDF v10.0.0 replaced by GlobalSettings.getDefaultOutputPdfFormat()

Gets a PdfFormat object that represents the default format for the PDF document.

Returns:
the PdfFormat of the documents object.
See Also:
PdfFormat

setDefaultPdfFormat

public static void setDefaultPdfFormat(PdfFormat pdfFormat)
Deprecated. as of DynamicPDF v10.0.0 replaced by GlobalSettings.setDefaultOutputPdfFormat(PdfFormat)

Sets a PdfFormat object for the Document.

Parameters:
pdfFormat - the documents PdfFormat object.
See Also:
PdfFormat

getDefaultPdfVersion

public static PdfVersion getDefaultPdfVersion()
Deprecated. as of DynamicPDF v10.0.0 replaced by GlobalSettings.getDefaultOutputPdfVersion()

Gets a PdfVersion object that represents the default version for the PDF document.

Returns:
the PdfVersion of the documents object.
See Also:
PdfVersion

setDefaultPdfVersion

public static void setDefaultPdfVersion(PdfVersion pdfVersion)
Deprecated. as of DynamicPDF v10.0.0 replaced by GlobalSettings.setDefaultOutputPdfVersion(PdfVersion)

Sets a PdfVersion object for the Document.

Parameters:
pdfVersion - the documents PdfVersion object.
See Also:
PdfVersion

getViewerPreferences

public ViewerPreferences getViewerPreferences()
Gets a ViewerPreferences object that represent the viewer preferences of the Document.

Returns:
the ViewerPreferences of the documents object.
See Also:
ViewerPreferences

setTemplate

public void setTemplate(Template template)
Sets a Template object for the Document.

Parameters:
template - the documents Template object.
See Also:
Template

getTemplate

public Template getTemplate()
Gets a Template object for the Document.

Returns:
the documents Template object.
See Also:
Template

setStampTemplate

public void setStampTemplate(Template template)
Sets a Template object for the Document. All page elements within this Template will appear in the foreground of the other contents of the PDF.

Parameters:
template - the documents Template object.
See Also:
Template

getStampTemplate

public Template getStampTemplate()
Gets a Template object for the Document.

Returns:
the documents Template object.
See Also:
Template

getSections

public SectionList getSections()
Gets a SectionList object for the Document. Used to break a document into section.

Returns:
the documents SectionList object.
See Also:
SectionList

setPdfFormat

public void setPdfFormat(PdfFormat pdfFormat)
Sets a PdfFormat object for the Document.

Parameters:
pdfFormat - the documents PdfFormat object.
See Also:
PdfFormat

getPdfFormat

public PdfFormat getPdfFormat()
Gets a PdfFormat object that represents the format for the PDF document.

Returns:
the PdfFormat of the documents object.
See Also:
PdfFormat

getOutputIntents

public OutputIntentList getOutputIntents()
Gets the output intent list for the Document.

Returns:
he output intent list for the Document.

getTrapped

public Trapped getTrapped()
Gets a value indicating if trapping information is present in the Document.

Returns:
a value indicating if trapping information is present in the Document.

setTrapped

public void setTrapped(Trapped value)
Sets a value indicating if trapping information is present in the Document.

Parameters:
value - indicating if trapping information is present in the Document.

getReaderEvents

public DocumentReaderEvents getReaderEvents()
Gets the reader events of the document.

Returns:
the reader events of the document.

getPackage

public DocumentPackage getPackage()
Gets the document package.

Returns:
the document package.

setPackage

public void setPackage(DocumentPackage value)
Sets the document package.

Parameters:
value - the document package.

getPdfXVersion

public PdfXVersion getPdfXVersion()
Gets the PDF/X version for the Document.

Returns:
the PDF/X version for the Document.

setPdfXVersion

public void setPdfXVersion(PdfXVersion value)
sets the PDF/X version for the Document.

Parameters:
value - the PDF/X version for the Document.

getPages

public PageList getPages()
Gets a PageList object that represent the pages of the Document.

Returns:
the collection of pages for the Document.
See Also:
PageList

getOutlines

public OutlineList getOutlines()
Gets an OutlineList object that represents the top level outlines of the Document.

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

Returns:
the documents OutlineList object.
See Also:
OutlineList

setInitialPageZoom

public void setInitialPageZoom(PageZoom initialPageZoom)
Sets a value indicating the initial zoom of the Document.

Parameters:
initialPageZoom - the PageZoom of the document.
See Also:
PageZoom

getInitialPageZoom

public PageZoom getInitialPageZoom()
Gets a value indicating the initial zoom of the Document.

Returns:
the PageZoom of the document
See Also:
PageZoom

setInitialPageMode

public void setInitialPageMode(PageMode initialPageMode)
Sets a value indicating the initial page mode of the Document.

Parameters:
initialPageMode - the PageMode of the document.
See Also:
PageMode

getInitialPageMode

public PageMode getInitialPageMode()
Gets a value indicating the initial page mode of the Document.

Returns:
the PageMode of the document
See Also:
PageMode

setInitialPage

public void setInitialPage(int initialPage)
Sets a value indicating the initial page of the Document.

Parameters:
initialPage - the integer value indicating the documents initial page.

getInitialPageLayout

public PageLayout getInitialPageLayout()
Gets a value indicating the intial layout of the Document.

Returns:
a value indicating the intial layout of the Document.

setInitialPageLayout

public void setInitialPageLayout(PageLayout value)
Sets a value indicating the intial layout of the Document.

Parameters:
value - the intial layout of the Document.

getInitialPage

public int getInitialPage()
Gets a value indicating the initial page of the Document.

Returns:
the integer value indicating the documents initial page.

getProducer

public java.lang.String getProducer()
Gets a value indicating the producer of the Document. This value appears as a property of the generated PDF document.

Returns:
the String value indicating the documents producer.

setProducer

public void setProducer(java.lang.String producer)
Sets a value indicating the producer of the Document. This value appears as a property of the generated PDF document.

Parameters:
producer - the String value indicating the documents producer.

setAuthor

public void setAuthor(java.lang.String author)
Sets a value indicating the author of the Document. This value appears as a property of the generated PDF document.

Parameters:
author - the String value indicating the documents author.

getAuthor

public java.lang.String getAuthor()
Gets a value indicating the author of the Document. This value appears as a property of the generated PDF document.

Returns:
the String value indicating the documents author.

getLanguage

public java.lang.String getLanguage()
Gets a value indicating the language of the Document. This value appears as the language identifier property of the generated PDF document.

Returns:
the language of the Document.

setLanguage

public void setLanguage(java.lang.String value)
sets a value indicating the language of the Document. This value appears as the language identifier property of the generated PDF document.

Parameters:
value - the language of the Document.

setCreator

public void setCreator(java.lang.String creator)
Sets a value indicating the creator of the Document. This value appears as a property of the generated PDF document.

Parameters:
creator - the String value indicating the documents creator.

getCreator

public java.lang.String getCreator()
Gets a value indicating the creator of the Document. This value appears as a property of the generated PDF document.

Returns:
the String value indicating the documents creator.

setKeywords

public void setKeywords(java.lang.String keywords)
Sets a value indicating the keywords of the Document. This value appears as a property of the generated PDF document.

Parameters:
keywords - A comma seperated string value indicating the document's keywords. Each keyword should be seperated by a comma.

getKeywords

public java.lang.String getKeywords()
Gets a value indicating the keywords of the Document. This value appears as a property of the generated PDF document.

Returns:
the String value indicating the document's keywords.

setSubject

public void setSubject(java.lang.String subject)
Sets a value indicating the subject of the Document. This value appears as a property of the generated PDF document.

Parameters:
subject - the String value indicating the documents subject.

getSubject

public java.lang.String getSubject()
Gets a value indicating the subject of the Document. This value appears as a property of the generated PDF document.

Returns:
the String value indicating the documents subject.

setTitle

public void setTitle(java.lang.String title)
Sets a value indicating the title of the Document. This value appears as a property of the generated PDF document.

Parameters:
title - the String value indicating the documents title.

getTitle

public java.lang.String getTitle()
Gets a value indicating the title of the Document. This value appears as a property of the generated PDF document.

Returns:
the String value indicating the documents title.

getCustomProperties

public CustomPropertyList getCustomProperties()
Gets a value indicating the custom properties of the Document.

Returns:
object of type CustomPropertyList
See Also:
View Example

setCompressionLevel

public void setCompressionLevel(int compressionLevel)
Sets a value indicating the compression level of the Document. A value from 0 to 9 indicating the compression level of the document. Six (6) is the default. Zero (0) represents no compression and nine (9) represents the best compression. This value will only affect the compression of the content streams of the documents pages. Depending on the type of document you are creating, it may not affect the size significantly.

Throws:
java.lang.IllegalArgumentException - Compression level should be 0-9
Parameters:
compressionLevel - the int value used to set the compression level of the Document

getCompressionLevel

public int getCompressionLevel()
Gets a value indicating the compression level of the Document.

Returns:
integer value indicating the compression level of * the Document.

setSecurity

public void setSecurity(Security security)
Sets an object to control the security and encryption of the Document.

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

Parameters:
security - Security object which controls the encryption and security of the generated PDF document.

getSecurity

public Security getSecurity()
Gets an object to control the security and encryption of the Document.

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

Returns:
Security object which controls the encryption and security of the generated PDF document.

getForm

public Form getForm()
Gets a form object for the PDF document.

Licensing:
Reading the values or properties of a field is a DynamicPDF Merger Standard Edition feature (for modifying field values see below). One of the following licenses is required for non-evaluation usage:

Modiying the values of the fields (i.e. form filling) is a Professional Edition Feature. One of the following licenses is required for non-evaluation usage:

Returns:
A form object for the PDF document.

getPdfVersion

public PdfVersion getPdfVersion()
Gets the PDF version of the PDF document.

Returns:
the PDF version of the PDF document.

setPdfVersion

public void setPdfVersion(PdfVersion ver)
Sets the PDF version of the PDF document.

Parameters:
ver - the PDF version of the PDF document.

setXmpMetadata

public void setXmpMetadata(XmpMetadata xmp)
Sets the xmp metadata.

Parameters:
xmp - the xmp metadata. View Example

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

  • DynamicPDF Generator Enterprise Edition
  • DynamicPDF Merger Enterprise Edition


getXmpMetadata

public XmpMetadata getXmpMetadata()
Gets the xmp metadata.

Returns:
the xmp metadata.

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

  • DynamicPDF Generator Enterprise Edition
  • DynamicPDF Merger Enterprise Edition


getEmbeddedFiles

public EmbeddedFileList getEmbeddedFiles()
Gets an EmbeddedFileList containing the EmbeddedFile for the document.

Returns:
an EmbeddedFileList containing the EmbeddedFile for the document.

getJavaScripts

public DocumentJavaScriptList getJavaScripts()
Gets a DocumentJavaScriptList containing the JavaScript entries for that document.

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

Returns:
the document javaScript list.
See Also:
DocumentJavaScriptList

drawRootEntries

protected void drawRootEntries(DocumentWriter writer)
Outputs the catalog entries to the DocumentWriter.

Parameters:
writer - DocumentWriter object to write the catalog entries.
See Also:
DocumentWriter

getTag

public TagOptions getTag()
Gets a value indicating whether document is tagged.

Returns:
a value indicating whether document is tagged.

setTag

public void setTag(TagOptions tagOptions)
Gets a value indicating whether document is tagged.

Parameters:
tagOptions - a value indicating whether document is tagged.

setFormFlattening

public void setFormFlattening(FormFlatteningOptions value)
Deprecated. as of DynamicPDF v8.0.0 replaced by Form.setOutput(FormOutput)

Sets the form flattening options for the PDF document.

Parameters:
value - the form flattening options for the PDF document.

getFormFlattening

public FormFlatteningOptions getFormFlattening()
Deprecated. as of DynamicPDF v8.0.0 replaced by Form.getOutput()

Gets the form flattening options for the PDF document.

Returns:
the form flattening options for the PDF document.

getOptimization

public DocumentOptimization getOptimization()
Gets the document optimization.

Returns:
document optimization.

setOptimization

public void setOptimization(DocumentOptimization value)
Sets the document optimization.

Parameters:
value - document optimization value.

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.04 for Java generated on September 25, 2019
© Copyright 2019, ceTe Software