public class PDFFile
extends java.lang.Object
Constructor and Description |
---|
PDFFile(byte[] bytes)
Creates a new PDF file for the PDF file bytes.
|
Modifier and Type | Method and Description |
---|---|
void |
clearPageCache()
Clears the page cache.
|
ColorFactory |
getColorFactory() |
FontFactory |
getFontFactory()
Graphics object creation factories
|
ImageFactory |
getImageFactory() |
PDFMarkupHandler |
getMarkupHandler()
The callback handler
|
PDFPage |
getPage(int aPageIndex)
Returns an individual PDF page for the given page index.
|
int |
getPageCount()
Returns the number of PDF pages in the PDF file.
|
PathFactory |
getPathFactory() |
float |
getVersion()
Gets the pdf version as a float.
|
java.lang.Object |
getXRefObject(PDFXEntry anEntry)
Returns the object from the xref table, reading it if necessary.
|
int |
getXRefTablePosition()
PDF reading starts at file end - this routine starts at end and searches backwards until it finds startxref key
It returns file offset to the xref table (also checks that a valid EOF is present).
|
java.lang.Object |
inheritedAttributeForKeyInPage(java.lang.String aKey,
java.util.Map aPage)
Returns x.
|
java.lang.Object |
readCompressedEntry(int ostmNum,
int objIndex) |
void |
resetXRefTable()
Call this to clear the state of all xref table entries.
|
java.lang.Object |
resolveObject(java.lang.Object obj)
Given an object, check to see if its an indirect reference - if so, resolve the reference.
|
void |
setColorFactory(ColorFactory c) |
void |
setFontFactory(FontFactory f) |
void |
setImageFactory(ImageFactory f) |
void |
setMarkupHandler(PDFMarkupHandler h) |
void |
setPathFactory(PathFactory p) |
void |
setStripsExtendedGStates(boolean flag) |
public PDFFile(byte[] bytes)
public float getVersion()
public PDFPage getPage(int aPageIndex)
public void clearPageCache()
public int getPageCount()
public java.lang.Object inheritedAttributeForKeyInPage(java.lang.String aKey, java.util.Map aPage)
public int getXRefTablePosition()
public java.lang.Object getXRefObject(PDFXEntry anEntry)
public java.lang.Object resolveObject(java.lang.Object obj)
public java.lang.Object readCompressedEntry(int ostmNum, int objIndex)
public void resetXRefTable()
public void setStripsExtendedGStates(boolean flag)
public FontFactory getFontFactory()
public void setFontFactory(FontFactory f)
public PathFactory getPathFactory()
public void setPathFactory(PathFactory p)
public ColorFactory getColorFactory()
public void setColorFactory(ColorFactory c)
public ImageFactory getImageFactory()
public void setImageFactory(ImageFactory f)
public PDFMarkupHandler getMarkupHandler()
public void setMarkupHandler(PDFMarkupHandler h)