Package com.ribs.pdf
Class PDFFile
- java.lang.Object
-
- com.ribs.pdf.PDFFile
-
public class PDFFile extends java.lang.Object
This class is used to read a PDF file for parsing.
-
-
Constructor Summary
Constructors Constructor Description PDFFile(byte[] bytes)
Creates a new PDF file for the PDF file bytes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearPageCache()
void
dumpAll(int max)
ColorFactory
getColorFactory()
FontFactory
getFontFactory()
ImageFactory
getImageFactory()
PDFMarkupHandler
getMarkupHandler()
PDFPage
getPage(int pageIndex)
Returns an individual PDF page for the given page index.int
getPageCount()
Returns the number of PDF pages in the PDF file.PathFactory
getPathFactory()
java.lang.Object
inheritedAttributeForKeyInPage(java.lang.String aKey, java.util.Map aPage)
static void
main(java.lang.String[] args)
java.lang.Object
readCompressedEntry(int ostmNum, int objIndex)
static PDFFile
readFile(java.io.File file)
Convenience method to load a new PDFFile from a java.io.Filevoid
resetXRefTable()
Call this to clear the state of all xref table entries.java.lang.Object
resolveObject(java.lang.Object obj)
void
setColorFactory(ColorFactory c)
void
setFontFactory(FontFactory f)
Graphics object creation factoriesvoid
setImageFactory(ImageFactory f)
void
setMarkupHandler(PDFMarkupHandler h)
The callback handlervoid
setPathFactory(PathFactory p)
void
setStripsExtendedGStates(boolean flag)
-
-
-
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
-
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(java.io.File file) throws java.io.IOException
Convenience method to load a new PDFFile from a java.io.File- Throws:
java.io.IOException
-
dumpAll
public void dumpAll(int max) throws ParseException
- Throws:
ParseException
-
main
public static void main(java.lang.String[] args)
-
-