org.apache.pdfbox.pdmodel
Class ConformingPDDocument

java.lang.Object
  extended by org.apache.pdfbox.pdmodel.PDDocument
      extended by org.apache.pdfbox.pdmodel.ConformingPDDocument
All Implemented Interfaces:
java.awt.print.Pageable

public class ConformingPDDocument
extends PDDocument

Author:
adam

Field Summary
 
Fields inherited from interface java.awt.print.Pageable
UNKNOWN_NUMBER_OF_PAGES
 
Constructor Summary
ConformingPDDocument()
           
ConformingPDDocument(COSDocument doc)
           
 
Method Summary
 COSBase getObjectFromPool(COSObjectKey key)
          This will get an object from the pool.
 COSBase getObjectFromPool(long number, long generation)
          This will get an object from the pool.
 java.util.List<COSObjectKey> getObjectKeysFromPool()
          This will get an object from the pool.
 ConformingPDFParser getParser()
           
static PDDocument load(java.io.File input)
          This will load a document from an input stream.
 void putObjectInPool(COSBase object, long number, long generation)
           
 void setParser(ConformingPDFParser parser)
           
 
Methods inherited from class org.apache.pdfbox.pdmodel.PDDocument
addPage, addSignature, addSignature, addSignatureField, clearWillEncryptWhenSaving, close, decrypt, encrypt, getCurrentAccessPermission, getDocument, getDocumentCatalog, getDocumentInformation, getEncryptionDictionary, getLastSignatureDictionary, getNumberOfPages, getOwnerPasswordForEncryption, getPageCount, getPageFormat, getPageMap, getPrintable, getSecurityHandler, getSignatureDictionaries, getSignatureDictionary, getSignatureFields, getUserPasswordForEncryption, importPage, isAllSecurityToBeRemoved, isEncrypted, isOwnerPassword, isUserPassword, load, load, load, load, load, load, load, load, load, load, load, loadNonSeq, loadNonSeq, loadNonSeq, loadNonSeq, openProtection, print, print, protect, removePage, removePage, save, save, save, saveIncremental, saveIncremental, setAllSecurityToBeRemoved, setDocumentInformation, setEncryptionDictionary, setSecurityHandler, silentPrint, silentPrint, wasDecryptedWithOwnerPassword, willEncryptWhenSaving
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConformingPDDocument

public ConformingPDDocument()
                     throws java.io.IOException
Throws:
java.io.IOException

ConformingPDDocument

public ConformingPDDocument(COSDocument doc)
                     throws java.io.IOException
Throws:
java.io.IOException
Method Detail

load

public static PDDocument load(java.io.File input)
                       throws java.io.IOException
This will load a document from an input stream.

Parameters:
input - The File which contains the document.
Returns:
The document that was loaded.
Throws:
java.io.IOException - If there is an error reading from the stream.

getObjectFromPool

public COSBase getObjectFromPool(COSObjectKey key)
                          throws java.io.IOException
This will get an object from the pool.

Parameters:
key - The object key.
Returns:
The object in the pool or a new one if it has not been parsed yet.
Throws:
java.io.IOException - If there is an error getting the proxy object.

getObjectKeysFromPool

public java.util.List<COSObjectKey> getObjectKeysFromPool()
                                                   throws java.io.IOException
This will get an object from the pool.

Parameters:
key - The object key.
Returns:
The object in the pool or a new one if it has not been parsed yet.
Throws:
java.io.IOException - If there is an error getting the proxy object.

getObjectFromPool

public COSBase getObjectFromPool(long number,
                                 long generation)
                          throws java.io.IOException
This will get an object from the pool.

Parameters:
number - the object number
generation - the generation of this object you wish to load
Returns:
The object in the pool
Throws:
java.io.IOException - If there is an error getting the proxy object.

putObjectInPool

public void putObjectInPool(COSBase object,
                            long number,
                            long generation)

getParser

public ConformingPDFParser getParser()
Returns:
the parser

setParser

public void setParser(ConformingPDFParser parser)
Parameters:
parser - the parser to set