|
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.
Security,
OutputStream
| Constructor Summary | |
Document()
Initializes a new instance of the Document class. |
|
| Method Summary | |
static boolean |
addLicense(java.lang.String licenseKey)
|
void |
append(Document document)
Append a Document to the end of the Document. |
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. |
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()
|
Form |
getForm()
Gets a form object for the PDF document. |
int |
getInitialPage()
Gets a value indicating the initial page 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. |
java.lang.String |
getKeywords()
Gets a value indicating the keywords 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. |
PdfVersion |
getPdfVersion()
Gets the PDF version of the PDF document. |
SectionList |
getSections()
Gets a SectionList object for the Document. |
Security |
getSecurity()
Gets an object to control the security and encryption of 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. |
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. |
void |
setForm(Form form)
Sets a form object for the PDF document. |
void |
setInitialPage(int initialPage)
Sets a value indicating the initial page 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 |
setPdfVersion(PdfVersion ver)
Sets the PDF version of the PDF document. |
void |
setProducer(byte[] producer,
int value)
Only users who have a password will be able to use this method. |
void |
setProducer(java.lang.String producer,
int value)
Only users who have a password will be able to use this method. |
void |
setSecurity(Security security)
Sets an object to control the security and encryption of 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. |
| 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)
producer - Name of the producervalue -
public void setProducer(byte[] producer,
int value)
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 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 SectionList getSections()
SectionList object for the Document.
Used to break a document into section.
SectionListpublic 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.
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 int getInitialPage()
Document.
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 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.
security - Security object which controls the encryption and
security of the generated PDF document.public Security getSecurity()
Document.
public void setForm(Form form)
form - A form object for the PDF document.public Form getForm()
public PdfVersion getPdfVersion()
public void setPdfVersion(PdfVersion ver)
|
DynamicPDF by ceTe Software | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||