Package com.ribs.pdf

Class PDFFile

java.lang.Object
com.ribs.pdf.PDFFile

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

    • _version

      public String _version
    • _xref

      public Vector _xref
  • Constructor Details

    • PDFFile

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

    • 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 Object inheritedAttributeForKeyInPage(String aKey, Map aPage)
    • readCompressedEntry

      public Object readCompressedEntry(int ostmNum, int objIndex)
    • resolveObject

      public Object resolveObject(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
    • getFontFactory

      public FontFactory getFontFactory()
    • setPathFactory

      public void setPathFactory(PathFactory p)
    • getPathFactory

      public PathFactory getPathFactory()
    • setColorFactory

      public void setColorFactory(ColorFactory c)
    • getColorFactory

      public ColorFactory getColorFactory()
    • setImageFactory

      public void setImageFactory(ImageFactory f)
    • getImageFactory

      public ImageFactory getImageFactory()
    • setMarkupHandler

      public void setMarkupHandler(PDFMarkupHandler h)
      The callback handler
    • getMarkupHandler

      public PDFMarkupHandler getMarkupHandler()
    • readFile

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

      public void dumpAll(int max) throws ParseException
      Throws:
      ParseException
    • main

      public static void main(String[] args)