Class PDFDocument

All Implemented Interfaces:
Serializable, Document

public class PDFDocument extends AbstractDocument
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Serial version UID.
      See Also:
  • Constructor Details

    • PDFDocument

      public PDFDocument()
  • Method Details

    • load

      public void load(InputStream inputStream) throws IOException
      Description copied from interface: Document
      Load document from an InputStream.
      Specified by:
      load in interface Document
      Overrides:
      load in class AbstractDocument
      Parameters:
      inputStream -
      Throws:
      IOException
    • getPageCount

      public int getPageCount() throws DocumentException
      Description copied from interface: Document
      Return document page count
      Returns:
      Number of pages.
      Throws:
      DocumentException
    • extract

      public Document extract(int begin, int end) throws DocumentException
      Description copied from interface: Document
      Return a new document containing pages of a given range. Note : begin and end indicies start at 1
      Parameters:
      begin - Index of the first page to extract
      end - Index of the last page to extract
      Returns:
      A new document.
      Throws:
      DocumentException
    • append

      public void append(Document document) throws DocumentException
      Description copied from interface: Document
      Append pages of another document to the current document.
      Specified by:
      append in interface Document
      Overrides:
      append in class AbstractDocument
      Parameters:
      document - Document ot append
      Throws:
      DocumentException
    • getType

      public String getType()
      Description copied from interface: Document
      Return the type of the document.
      Returns:
      A String representing the document type name.