DynamicPDF by ceTe Software

com.cete.dynamicpdf.merger
Class PdfDocument

java.lang.Object
  |
  +--com.cete.dynamicpdf.merger.PdfDocument

public class PdfDocument
extends java.lang.Object

This class should be used when you will be referencing an existing PDF document more than once.Using a PDFDocument is more efficient than specifying a file path because the document will not need to be parsed again on each subsequent reference. This class is safe for multithreaded operations.

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

View Example


Constructor Summary
PdfDocument(byte[] bytData)
          Initializes a new instance of the PdfDocument class.
PdfDocument(byte[] bytData, java.lang.String password)
          Initializes a new instance of the PdfDocument class.
PdfDocument(java.io.ByteArrayInputStream bais)
          Initializes a new instance of the PdfDocument class.
PdfDocument(java.io.ByteArrayInputStream bais, java.lang.String password)
          Initializes a new instance of the PdfDocument class.
PdfDocument(java.io.FileInputStream stream)
          Initializes a new instance of the PdfDocument class.
PdfDocument(java.io.FileInputStream stream, java.lang.String password)
          Initializes a new instance of the PdfDocument class.
PdfDocument(java.lang.String filePath)
          Initializes a new instance of the PdfDocument class.
PdfDocument(java.lang.String filePath, java.lang.String password)
          Initializes a new instance of the PdfDocument class.
 
Method Summary
 java.lang.String getAuthor()
          Gets the author property of the PDF document.
 java.lang.String getCreator()
          Gets the creator property of the PDF document.
 PdfForm getForm()
          Gets the AcroForm for the document.
 java.lang.String getKeywords()
          Gets the keywords property of the PDF document.
 PdfPage getPage(int pageNumber)
          Gets a page by page number.
 PdfPageList getPages()
          Gets a collection of PDF pages for the document.
 java.lang.String getProducer()
          Gets the producer property of the PDF document.
 java.lang.String getSubject()
          Gets the subject property of the PDF document.
 java.lang.String getTitle()
          Gets the title property of the PDF document.
 void setDocumentInfo(Document document)
          Sets the document info on the supplied Document to match this document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PdfDocument

public PdfDocument(java.io.FileInputStream stream)
Initializes a new instance of the PdfDocument class.

Parameters:
stream - FileInputStream object containing the PDF document data.
See Also:
FileInputStream

PdfDocument

public PdfDocument(java.lang.String filePath)
Initializes a new instance of the PdfDocument class.

Parameters:
filePath - Physical file path of the PDF document.

PdfDocument

public PdfDocument(byte[] bytData)
Initializes a new instance of the PdfDocument class.

Parameters:
bytData - Byte array containing the PDF document data.

PdfDocument

public PdfDocument(java.io.ByteArrayInputStream bais)
Initializes a new instance of the PdfDocument class.

Parameters:
bais - ByteArrayInputStream object containing the PDF document data.
See Also:
ByteArrayInputStream

PdfDocument

public PdfDocument(java.io.FileInputStream stream,
                   java.lang.String password)
Initializes a new instance of the PdfDocument class.

Parameters:
stream - FileInputStream object containing the PDF document data.
password - Owner password of the encrypted PDF document.
See Also:
FileInputStream

PdfDocument

public PdfDocument(java.lang.String filePath,
                   java.lang.String password)
Initializes a new instance of the PdfDocument class.

Parameters:
filePath - Physical file path of the PDF document.
password - Owner password of the encrypted PDF document.

PdfDocument

public PdfDocument(byte[] bytData,
                   java.lang.String password)
Initializes a new instance of the PdfDocument class.

Parameters:
bytData - Byte array containing the PDF document data.
password - Owner password of the encrypted pdf document.

PdfDocument

public PdfDocument(java.io.ByteArrayInputStream bais,
                   java.lang.String password)
Initializes a new instance of the PdfDocument class.

Parameters:
bais - ByteArrayInputStream object containing the PDF document data.
password - Owner password of the encrypted pdf document.
See Also:
ByteArrayInputStream
Method Detail

getPage

public PdfPage getPage(int pageNumber)
Gets a page by page number.

Parameters:
pageNumber - The page number to retrieve.
Returns:
A PdfPage object.
See Also:
PdfPage

getTitle

public java.lang.String getTitle()
Gets the title property of the PDF document.

Returns:
The title property of the PDF document.

getAuthor

public java.lang.String getAuthor()
Gets the author property of the PDF document.

Returns:
The author property of the PDF document.

getSubject

public java.lang.String getSubject()
Gets the subject property of the PDF document.

Returns:
The subject property of the PDF document.

getKeywords

public java.lang.String getKeywords()
Gets the keywords property of the PDF document.

Returns:
The keywords property of the PDF document.

getCreator

public java.lang.String getCreator()
Gets the creator property of the PDF document.

Returns:
The creator property of the PDF document.

getProducer

public java.lang.String getProducer()
Gets the producer property of the PDF document.

Returns:
The producer property of the PDF document.

getForm

public PdfForm getForm()
Gets the AcroForm for the document.

Returns:
The AcroForm for the document.
See Also:
PdfForm

setDocumentInfo

public void setDocumentInfo(Document document)
Sets the document info on the supplied Document to match this document.

Parameters:
document - A document to set.
See Also:
Document

getPages

public PdfPageList getPages()
Gets a collection of PDF pages for the document.

Returns:
A collection of PDF pages for the document.
See Also:
PdfPageList

DynamicPDF by ceTe Software

API Reference for DynamicPDFTM v4.0.3 for Java generated on March 22, 2007
© Copyright 2007, ceTe Software