Package com.ribs.pdf
Class PDFFile
java.lang.Object
com.ribs.pdf.PDFFile
This class is used to read a PDF file for parsing.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoiddumpAll(int max) getPage(int pageIndex) Returns an individual PDF page for the given page index.intReturns the number of PDF pages in the PDF file.inheritedAttributeForKeyInPage(String aKey, Map aPage) static voidreadCompressedEntry(int ostmNum, int objIndex) static PDFFileConvenience method to load a new PDFFile from a java.io.FilevoidCall this to clear the state of all xref table entries.resolveObject(Object obj) voidvoidGraphics object creation factoriesvoidvoidThe callback handlervoidvoidsetStripsExtendedGStates(boolean flag)
-
Field Details
-
_version
-
_xref
-
-
Constructor Details
-
PDFFile
public PDFFile(byte[] bytes) Creates a new PDF file for the PDF file bytes.
-
-
Method Details
-
getPage
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
-
readCompressedEntry
-
resolveObject
-
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
Graphics object creation factories -
getFontFactory
-
setPathFactory
-
getPathFactory
-
setColorFactory
-
getColorFactory
-
setImageFactory
-
getImageFactory
-
setMarkupHandler
The callback handler -
getMarkupHandler
-
readFile
Convenience method to load a new PDFFile from a java.io.File- Throws:
IOException
-
dumpAll
- Throws:
ParseException
-
main
-