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 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 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
- 
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)
 
 - 
 
 -