public class PDFPage
extends java.lang.Object
Constructor and Description |
---|
PDFPage(PDFFile aPdfFile,
int anIndex)
Creates a new PDF page for the given PDF file and page index.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
findResource(java.lang.String resourceName,
java.lang.String name)
Returns the named object from the page's resources.
|
java.awt.color.ColorSpace |
getColorspace(java.lang.Object csobj)
A colorspace can be specified in several ways.
|
java.awt.geom.Rectangle2D |
getCropBox()
Returns the crop box of this page.
|
java.util.Map |
getExtendedGStateNamed(java.lang.String name)
Accessors for the resource dictionaries
|
java.util.Map |
getFontDictForAlias(java.lang.String alias)
Returns the pdf Font dictionary for a given name (like "/f1").
|
java.awt.Image |
getImage()
Set everything to the default implementations and return an Image for this page.
|
java.awt.geom.Rectangle2D |
getMediaBox()
Returns the media box of this page.
|
java.lang.Object |
getPageContents()
Returns the page contents for this page.
|
PDFStream |
getPageContentsStream()
Returns the page contents as a PDF stream.
|
java.lang.Object |
getPageDict(java.util.Hashtable pages,
int pnum,
int[] start)
Returns the page dict for this page.
|
java.lang.Object |
getPageResources()
Returns the main resource directory for the page, which may be a reference.
|
PDFPattern |
getPattern(java.lang.String pdfName)
Creates a new pattern object for the resource name
|
java.util.List |
getResources()
Returns the resources stack for this page.
|
PDFShadingPattern |
getShading(java.lang.String pdfName)
Creates a new shadingPattern for the resource name.
|
java.lang.Object |
getXObject(java.lang.String pdfName) |
void |
parse()
Main entry point for parsing the page marking operations
|
void |
popResources() |
void |
pushResources(java.util.Map r)
Most pages will have only a single resource dictionary, which it may have inherited from the parent file.
|
public PDFPage(PDFFile aPdfFile, int anIndex)
public java.awt.geom.Rectangle2D getMediaBox()
public java.awt.geom.Rectangle2D getCropBox()
public java.util.List getResources()
public void pushResources(java.util.Map r)
public void popResources()
public java.lang.Object getPageResources()
public java.lang.Object findResource(java.lang.String resourceName, java.lang.String name)
public java.util.Map getExtendedGStateNamed(java.lang.String name)
public java.util.Map getFontDictForAlias(java.lang.String alias)
public java.awt.color.ColorSpace getColorspace(java.lang.Object csobj)
Note that colorspaces in pdf are usually specified as either strings (for one of the built-ins) or arrays (eg. [/CalRGB << ... >>])
public java.lang.Object getXObject(java.lang.String pdfName)
public PDFPattern getPattern(java.lang.String pdfName)
public PDFShadingPattern getShading(java.lang.String pdfName)
public java.lang.Object getPageContents()
public PDFStream getPageContentsStream()
public java.awt.Image getImage()
public void parse()
public java.lang.Object getPageDict(java.util.Hashtable pages, int pnum, int[] start)