Package com.ribs.pdf

Class PDFFile


  • public class PDFFile
    extends java.lang.Object
    This class is used to read a PDF file for parsing.
    • Field Detail

      • _version

        public java.lang.String _version
      • _xref

        public java.util.Vector _xref
    • Constructor Detail

      • PDFFile

        public PDFFile​(byte[] bytes)
        Creates a new PDF file for the PDF file bytes.
    • Method Detail

      • getPage

        public PDFPage getPage​(int pageIndex)
        Returns an individual PDF page for the given page index.
      • clearPageCache

        public void clearPageCache()
      • getPageCount

        public int getPageCount()
        Returns the number of PDF pages in the PDF file.
      • inheritedAttributeForKeyInPage

        public java.lang.Object inheritedAttributeForKeyInPage​(java.lang.String aKey,
                                                               java.util.Map aPage)
      • readCompressedEntry

        public java.lang.Object readCompressedEntry​(int ostmNum,
                                                    int objIndex)
      • resolveObject

        public java.lang.Object resolveObject​(java.lang.Object obj)
      • resetXRefTable

        public void resetXRefTable()
        Call this to clear the state of all xref table entries. This will allow objects created while examining the file to get garbage collected.
      • setStripsExtendedGStates

        public void setStripsExtendedGStates​(boolean flag)
      • setFontFactory

        public void setFontFactory​(FontFactory f)
        Graphics object creation factories
      • setPathFactory

        public void setPathFactory​(PathFactory p)
      • setColorFactory

        public void setColorFactory​(ColorFactory c)
      • setImageFactory

        public void setImageFactory​(ImageFactory f)
      • setMarkupHandler

        public void setMarkupHandler​(PDFMarkupHandler h)
        The callback handler
      • readFile

        public static PDFFile readFile​(java.io.File file)
                                throws java.io.IOException
        Convenience method to load a new PDFFile from a java.io.File
        Throws:
        java.io.IOException
      • main

        public static void main​(java.lang.String[] args)