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 TypeMethodDescriptionvoid
void
dumpAll
(int max) getPage
(int pageIndex) Returns an individual PDF page for the given page index.int
Returns the number of PDF pages in the PDF file.inheritedAttributeForKeyInPage
(String aKey, Map aPage) static void
readCompressedEntry
(int ostmNum, int objIndex) static PDFFile
Convenience method to load a new PDFFile from a java.io.Filevoid
Call this to clear the state of all xref table entries.resolveObject
(Object obj) void
void
Graphics object creation factoriesvoid
void
The callback handlervoid
void
setStripsExtendedGStates
(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
-