Class PdfFile


  • public class PdfFile
    extends java.lang.Object
    Wrapper for both iText's PdfReader (referring to a PDF file to read) and SUN's PDFFile (referring to the same PDF file to render).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.io.File directory
      The directory where the file can be found (if the PDF was passed as a file).
      protected java.lang.String filename
      The original filename.
      protected com.sun.pdfview.PDFFile PDFFile
      SUN's PDFFile object.
      protected Permissions permissions
      The file permissions
      protected PdfReader reader
      The PdfReader object.
    • Constructor Summary

      Constructors 
      Constructor Description
      PdfFile​(byte[] file)
      Constructs a PdfFile object.
      PdfFile​(java.io.File file)
      Constructs a PdfFile object.
    • Field Detail

      • directory

        protected java.io.File directory
        The directory where the file can be found (if the PDF was passed as a file).
      • filename

        protected java.lang.String filename
        The original filename.
      • reader

        protected PdfReader reader
        The PdfReader object.
      • PDFFile

        protected com.sun.pdfview.PDFFile PDFFile
        SUN's PDFFile object.
      • permissions

        protected Permissions permissions
        The file permissions
    • Constructor Detail

      • PdfFile

        public PdfFile​(java.io.File file)
                throws java.io.IOException,
                       DocumentException
        Constructs a PdfFile object.
        Parameters:
        file - the File to read
        Throws:
        java.io.IOException
        DocumentException
      • PdfFile

        public PdfFile​(byte[] file)
                throws java.io.IOException,
                       DocumentException
        Constructs a PdfFile object.
        Parameters:
        file - the byte[] to read
        Throws:
        java.io.IOException
        DocumentException
    • Method Detail

      • getPdfReader

        public PdfReader getPdfReader()
        Getter for iText's PdfReader object.
        Returns:
        a PdfReader object
      • getPDFFile

        public com.sun.pdfview.PDFFile getPDFFile()
        Getter for SUN's PDFFile object (for the renderer)
        Returns:
        a PDFFile object