Class ConformingPDDocument

java.lang.Object
org.apache.pdfbox.pdmodel.PDDocument
org.apache.pdfbox.pdmodel.ConformingPDDocument
All Implemented Interfaces:
Pageable, Closeable, AutoCloseable

public class ConformingPDDocument extends PDDocument
Author:
adam
  • Constructor Details

  • Method Details

    • load

      public static PDDocument load(File input) throws 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:
      IOException - If there is an error reading from the stream.
    • getObjectFromPool

      public COSBase getObjectFromPool(COSObjectKey key) throws 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:
      IOException - If there is an error getting the proxy object.
    • getObjectKeysFromPool

      public List<COSObjectKey> getObjectKeysFromPool() throws IOException
      This will get list of object keys from the pool.
      Returns:
      The list of object keys in the pool.
      Throws:
      IOException - If there is an error getting keys.
    • getObjectFromPool

      public COSBase getObjectFromPool(long number, long generation) throws 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:
      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