Package com.ribs.pdf
Class PDFFile
- java.lang.Object
- 
- com.ribs.pdf.PDFFile
 
- 
 public class PDFFile extends java.lang.ObjectThis class is used to read a PDF file for parsing.
- 
- 
Constructor SummaryConstructors Constructor Description PDFFile(byte[] bytes)Creates a new PDF file for the PDF file bytes.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPageCache()voiddumpAll(int max)ColorFactorygetColorFactory()FontFactorygetFontFactory()ImageFactorygetImageFactory()PDFMarkupHandlergetMarkupHandler()PDFPagegetPage(int pageIndex)Returns an individual PDF page for the given page index.intgetPageCount()Returns the number of PDF pages in the PDF file.PathFactorygetPathFactory()java.lang.ObjectinheritedAttributeForKeyInPage(java.lang.String aKey, java.util.Map aPage)static voidmain(java.lang.String[] args)java.lang.ObjectreadCompressedEntry(int ostmNum, int objIndex)static PDFFilereadFile(java.io.File file)Convenience method to load a new PDFFile from a java.io.FilevoidresetXRefTable()Call this to clear the state of all xref table entries.java.lang.ObjectresolveObject(java.lang.Object obj)voidsetColorFactory(ColorFactory c)voidsetFontFactory(FontFactory f)Graphics object creation factoriesvoidsetImageFactory(ImageFactory f)voidsetMarkupHandler(PDFMarkupHandler h)The callback handlervoidsetPathFactory(PathFactory p)voidsetStripsExtendedGStates(boolean flag)
 
- 
- 
- 
Method Detail- 
getPagepublic PDFPage getPage(int pageIndex) Returns an individual PDF page for the given page index.
 - 
clearPageCachepublic void clearPageCache() 
 - 
getPageCountpublic int getPageCount() Returns the number of PDF pages in the PDF file.
 - 
inheritedAttributeForKeyInPagepublic java.lang.Object inheritedAttributeForKeyInPage(java.lang.String aKey, java.util.Map aPage)
 - 
readCompressedEntrypublic java.lang.Object readCompressedEntry(int ostmNum, int objIndex)
 - 
resolveObjectpublic java.lang.Object resolveObject(java.lang.Object obj) 
 - 
resetXRefTablepublic 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.
 - 
setStripsExtendedGStatespublic void setStripsExtendedGStates(boolean flag) 
 - 
setFontFactorypublic void setFontFactory(FontFactory f) Graphics object creation factories
 - 
getFontFactorypublic FontFactory getFontFactory() 
 - 
setPathFactorypublic void setPathFactory(PathFactory p) 
 - 
getPathFactorypublic PathFactory getPathFactory() 
 - 
setColorFactorypublic void setColorFactory(ColorFactory c) 
 - 
getColorFactorypublic ColorFactory getColorFactory() 
 - 
setImageFactorypublic void setImageFactory(ImageFactory f) 
 - 
getImageFactorypublic ImageFactory getImageFactory() 
 - 
setMarkupHandlerpublic void setMarkupHandler(PDFMarkupHandler h) The callback handler
 - 
getMarkupHandlerpublic PDFMarkupHandler getMarkupHandler() 
 - 
readFilepublic 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
 
 - 
dumpAllpublic void dumpAll(int max) throws ParseException- Throws:
- ParseException
 
 - 
mainpublic static void main(java.lang.String[] args) 
 
- 
 
-