DynamicPDF by ceTe Software

com.cete.dynamicpdf.merger
Class PdfDocument

java.lang.Object
  extended by 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
 Attachment[] getAttachments()
          Retrieves the attachment files in the PDFDocument.
 java.lang.String getAuthor()
          Gets the author property of the PDF document.
 CollectionType getCollectionType()
          Gets a boolen whether PDF document contains any collection entries.
 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.
 PdfOutlineList getOutlines()
          Gets the outlines 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.
 SecurityInfo getSecurityInfo()
          Gets the security type of the PDF document.
 java.lang.String getSubject()
          Gets the subject property of the PDF document.
 boolean getTagged()
           
 java.lang.String getText()
          Gets a text from the document.
 java.lang.String getTitle()
          Gets the title property of the PDF document.
 java.lang.String getXmpMetadata()
          Gets the xml metadata string.
 void setCollectionType(CollectionType value)
           
 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.

getTagged

public boolean getTagged()

getSecurityInfo

public SecurityInfo getSecurityInfo()
Gets the security type of the PDF document.

Returns:
SecurityInfo.

getProducer

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

Returns:
The producer property of the PDF document.

getAttachments

public Attachment[] getAttachments()
Retrieves the attachment files in the PDFDocument.


getXmpMetadata

public java.lang.String getXmpMetadata()
Gets the xml metadata string.

Returns:
the xml metadata string.

getOutlines

public PdfOutlineList getOutlines()
Gets the outlines of the PDF document.

Returns:
The PdfOutline at the given index.

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

  • DynamicPDF Merger Standard Edition
  • DynamicPDF Merger Professional Edition
  • DynamicPDF Merger Enterprise Edition


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

getCollectionType

public CollectionType getCollectionType()
Gets a boolen whether PDF document contains any collection entries.

Returns:
a boolen whether PDF document contains any collection entries.

setCollectionType

public void setCollectionType(CollectionType value)

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

getText

public java.lang.String getText()
Gets a text from the document.

Returns:
A string containg the text of the document.

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

  • DynamicPDF Merger Professional Edition
  • DynamicPDF Merger Enterprise Edition

View Example

DynamicPDF by ceTe Software

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