|
DynamicPDF by ceTe Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.cete.dynamicpdf.Document
Represents a PDF Document.
This is the primary class used to generate the Dynamic 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.
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 |
append(Document document)
Deprecated. As of DynamicPDF Generator v4.0.0, Copy the pages to the document or use the PdfDocument object instead. |
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. |
void |
drawToWebPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut)
Deprecated. As of DynamicPDF Generator v3.0.2 Beta1, replaced by Document.drawToWeb(HttpServletRequest, HttpServletResponse, OutputStream) |
void |
drawToWebPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
boolean allowBrowserCaching)
Deprecated. As of DynamicPDF Generator v3.0.2 Beta1, replaced by Document.drawToWeb(HttpServletRequest, HttpServletResponse, OutputStream, boolean) |
void |
drawToWebPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
java.lang.String downloadAsFileName)
Deprecated. As of DynamicPDF Generator v3.0.2 Beta1, replaced by Document.drawToWeb(HttpServletRequest, HttpServletResponse, OutputStream, String) |
void |
drawToWebPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
java.lang.String downloadAsFileName,
boolean forceDownload)
Deprecated. As of DynamicPDF Generator v3.0.2 Beta1, replaced by Document.drawToWeb(HttpServletRequest, HttpServletResponse, OutputStream, String, boolean) |
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()
|
static PdfFormat |
getDefaultPdfFormat()
Gets a PdfFormat object that represents the default format for the PDF document. |
static PdfVersion |
getDefaultPdfVersion()
Gets a PdfVersion object that represents the default version for the PDF document. |
Form |
getForm()
Gets a form object for the PDF document. |
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. |
OutlineList |
getOutlines()
Gets an OutlineList object that represents the top level
outlines of the Document. |
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. |
Prepress |
getPrepress()
Gets the prepress settings for the document. |
java.lang.String |
getProducer()
Gets a value indicating the producer 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. |
Template |
getTemplate()
Gets a Template object for the Document. |
java.lang.String |
getTitle()
Gets a value indicating the title of 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)
Sets a PdfFormat object for the Document. |
static void |
setDefaultPdfVersion(PdfVersion pdfVersion)
Sets a PdfVersion object for the Document. |
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 |
setPdfFormat(PdfFormat pdfFormat)
Sets a PdfFormat object for the Document. |
void |
setPdfVersion(PdfVersion ver)
Sets the PDF version of the PDF document. |
void |
setProducer(byte[] producer,
int value)
Deprecated. As of DynamicPDF v4.0.0, replaced by Document.setProducer(String producer) |
void |
setProducer(java.lang.String producer)
Sets a value indicating the producer of the Document. |
void |
setProducer(java.lang.String producer,
int value)
Deprecated. As of DynamicPDF v4.0.0, replaced by Document.setProducer(String producer) |
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 |
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 |
setXmpMetadata(XmpMetadata xmp)
Sets the xmp metadata. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Document()
Document class.
| Method Detail |
public void setProducer(java.lang.String producer,
int value)
Document.setProducer(String producer)
producer - Name of the producervalue -
public void setProducer(byte[] producer,
int value)
Document.setProducer(String producer)
producer - Name of the producervalue - public static boolean addLicense(java.lang.String licenseKey)
licenseKey - A string representing license key provided to you by ceTe Software.public byte[] draw()
Document to a byte array. View Example
public void draw(java.lang.String filePath)
Document to a file. View Example
GeneratorException - If specified path is incorrect.filePath - the String representing the file path to store the
Document.public void draw(java.io.OutputStream outStream)
Document to the given
OutputStream object. View Example
GeneratorException - If specified stream is incorrect.outStream - the OutputStream object that receive the
Document output.
public void drawToWeb(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut)
Document to the given
HttpServletResponse object. View Example
GeneratorException - If generated PDF can't be write to
specified stream.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.
public void drawToWeb(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
boolean allowBrowserCaching)
Document to the given
HttpServletResponse object. View Example
GeneratorException - If generated PDF can't be write to
specified stream.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.
public void drawToWeb(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
java.lang.String downloadAsFileName)
Document to the given
HttpServletResponse object. View Example
GeneratorException - If generated PDF can't be write to
specified stream.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.
public void drawToWeb(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
java.lang.String downloadAsFileName,
boolean forceDownload)
Document to the given
HttpServletResponse object. View Example
GeneratorException - If generated PDF can't be write to
specified stream.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.
public void drawToWebPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut)
Document.drawToWeb(HttpServletRequest, HttpServletResponse, OutputStream)
Document to the given
HttpServletResponse object.
GeneratorException - If generated PDF can't be write to
specified stream.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.
public void drawToWebPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
boolean allowBrowserCaching)
Document.drawToWeb(HttpServletRequest, HttpServletResponse, OutputStream, boolean)
Document to the given
HttpServletResponse object.
GeneratorException - If generated PDF can't be write to
specified stream.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.
public void drawToWebPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
java.lang.String downloadAsFileName)
Document.drawToWeb(HttpServletRequest, HttpServletResponse, OutputStream, String)
Document to the given
HttpServletResponse object.
GeneratorException - If generated PDF can't be write to
specified stream.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.
public void drawToWebPage(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.OutputStream sOut,
java.lang.String downloadAsFileName,
boolean forceDownload)
Document.drawToWeb(HttpServletRequest, HttpServletResponse, OutputStream, String, boolean)
Document to the given
HttpServletResponse object.
GeneratorException - If generated PDF can't be write to
specified stream.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.public void requireLicense(int level)
public void requireLicense()
public void append(Document document)
Document to the end of the Document.
document - the Document to be appended to the end of the
Document.public static PdfFormat getDefaultPdfFormat()
PdfFormatpublic static void setDefaultPdfFormat(PdfFormat pdfFormat)
PdfFormat object for the Document.
pdfFormat - the documents PdfFormat object.PdfFormatpublic static PdfVersion getDefaultPdfVersion()
PdfVersionpublic static void setDefaultPdfVersion(PdfVersion pdfVersion)
PdfVersion object for the Document.
pdfVersion - the documents PdfVersion object.PdfVersionpublic ViewerPreferences getViewerPreferences()
Document.
ViewerPreferencespublic void setTemplate(Template template)
Template object for the Document.
template - the documents Template object.Templatepublic Template getTemplate()
Template object for the Document.
Templatepublic void setStampTemplate(Template template)
Template object for the Document.
All page elements within this Template will appear in the foreground of the other contents of the PDF.
template - the documents Template object.Templatepublic Template getStampTemplate()
Template object for the Document.
Templatepublic SectionList getSections()
SectionList object for the Document.
Used to break a document into section.
SectionListpublic void setPdfFormat(PdfFormat pdfFormat)
PdfFormat object for the Document.
pdfFormat - the documents PdfFormat object.PdfFormatpublic PdfFormat getPdfFormat()
PdfFormatpublic Prepress getPrepress()
Licensing:
This property is a DynamicPDF Generator Enterprise
Edition feature. One of the following licenses is required for non-evaluation usage:
Prepresspublic PageList getPages()
PageList object that represent the pages of the
Document.
Document.PageListpublic OutlineList getOutlines()
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:
OutlineListpublic void setInitialPageZoom(PageZoom initialPageZoom)
Document.
initialPageZoom - the PageZoom of the document.PageZoompublic PageZoom getInitialPageZoom()
Document.
PageZoompublic void setInitialPageMode(PageMode initialPageMode)
Document.
initialPageMode - the PageMode of the document.PageModepublic PageMode getInitialPageMode()
Document.
PageModepublic void setInitialPage(int initialPage)
Document.
initialPage - the integer value indicating the documents
initial page.public PageLayout getInitialPageLayout()
public void setInitialPageLayout(PageLayout value)
public int getInitialPage()
Document.
public java.lang.String getProducer()
Document.
This value appears as a property of the generated PDF document.
public void setProducer(java.lang.String producer)
Document.
This value appears as a property of the generated PDF document.
producer - the String value indicating the documents producer.public void setAuthor(java.lang.String author)
Document.
This value appears as a property of the generated PDF document.
author - the String value indicating the documents author.public java.lang.String getAuthor()
Document.
This value appears as a property of the generated PDF document.
public java.lang.String getLanguage()
public void setLanguage(java.lang.String value)
public void setCreator(java.lang.String creator)
Document.
This value appears as a property of the generated PDF document.
creator - the String value indicating the documents creator.public java.lang.String getCreator()
public void setKeywords(java.lang.String keywords)
Document.
This value appears as a property of the generated PDF document.
keywords - A comma seperated string value indicating the
document's keywords. Each keyword should be seperated by a comma.public java.lang.String getKeywords()
Document.
This value appears as a property of the generated PDF document.
public void setSubject(java.lang.String subject)
Document.
This value appears as a property of the generated PDF document.
subject - the String value indicating the documents subject.public java.lang.String getSubject()
Document.
This value appears as a property of the generated PDF document.
public void setTitle(java.lang.String title)
Document.
This value appears as a property of the generated PDF document.
title - the String value indicating the documents title.public java.lang.String getTitle()
Document.
This value appears as a property of the generated PDF document.
public void setCompressionLevel(int compressionLevel)
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.
java.lang.IllegalArgumentException - Compression level should be 0-9compressionLevel - the int value used to set the compression level
of the Documentpublic int getCompressionLevel()
Document.
Document.public void setSecurity(Security security)
Document.
Licensing:
This property is a DynamicPDF Generator Enterprise
Edition feature. One of the following licenses is required for non-evaluation usage:
security - Security object which controls the encryption and
security of the generated PDF document.public Security getSecurity()
Document.
Licensing:
This property is a DynamicPDF Generator Enterprise
Edition feature. One of the following licenses is required for non-evaluation usage:
public Form getForm()
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:
public PdfVersion getPdfVersion()
public void setPdfVersion(PdfVersion ver)
public void setXmpMetadata(XmpMetadata xmp)
Licensing:
This property is a DynamicPDF Generator Enterprise
Edition feature. One of the following licenses is required for non-evaluation usage:
public XmpMetadata getXmpMetadata()
Licensing:
This property is a DynamicPDF Generator Enterprise
Edition feature. One of the following licenses is required for non-evaluation usage:
public DocumentJavaScriptList getJavaScripts()
Licensing:
This property is a DynamicPDF Generator Enterprise
Edition feature. One of the following licenses is required for non-evaluation usage:
DocumentJavaScriptListprotected void drawRootEntries(DocumentWriter writer)
DocumentWriter.
writer - DocumentWriter object to write the catalog entries.DocumentWriter
|
DynamicPDF by ceTe Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||