|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Object representation of a page in a PDF document. This interface provides information about a page in a PDF document and has methods to paint and print the page.
| Method Summary | |
TextSelection |
clearTextSelection()
Clear any text selection on the page. |
Vector |
getAnnotations()
Returns a list of PDF annotations in this page. |
Rectangle2D |
getBleedBox()
Return this page's Bleed Box. |
Rectangle2D |
getCropBox()
Return this page's Crop Box. |
double |
getDisplayHeight()
Gets the page's display height. |
double |
getDisplayWidth()
Gets the page's display width. |
double |
getDisplayX()
Returns the page's left margin. |
double |
getDisplayY()
Returns the page's top margin. |
BufferedImage |
getImage(int width,
int height,
boolean keepAspect)
Returns a buffered image showing the contents of this page. |
Rectangle2D |
getMediaBox()
Returns this page's Media Box. |
int |
getPageRotation()
Returns the rotation of this page in degrees. |
TextSelection |
getSelectedText()
Returns information about currently selected text on the page. |
BufferedImage |
getSubImage(Rectangle2D pageArea,
double scale)
Create a BufferedImage of a sub rectangle in a page at a given scale. |
Vector |
getText(int pageIndex)
Return a list of PDFText objects containing all the text in this page. |
Rectangle2D |
getTrimBox()
Return this page's Trim Box. |
void |
paintPage(Graphics2D g2d)
Paints this page to the given graphics object. |
void |
printPage(Graphics2D g2d,
PageFormat pf,
PrintSettings printSettings)
Prints this page given a page format describing the printer's page and a PrintSettings object. |
TextSelection |
selectText(Rectangle2D selectArea)
Selects the text in an area of the page. |
void |
setInvertMode(boolean invertMode)
Sets the page to paint in inverted mode: Black will show as white and white as black. |
| Method Detail |
public Rectangle2D getMediaBox()
public Rectangle2D getCropBox()
public Rectangle2D getBleedBox()
public Rectangle2D getTrimBox()
public void paintPage(Graphics2D g2d)
g2d - Graphics objects to paint the page to.
PDFException - Any errors encountered during painting the page.public void setInvertMode(boolean invertMode)
invertMode - The new invert mode.
public void printPage(Graphics2D g2d,
PageFormat pf,
PrintSettings printSettings)
g2d - Printer graphics object.pf - PageFormat object to use when printing.printSettings - Printing preferences.public double getDisplayHeight()
public double getDisplayWidth()
public double getDisplayX()
public double getDisplayY()
public int getPageRotation()
public Vector getAnnotations()
throws PDFException
PDFException
public Vector getText(int pageIndex)
throws PDFException
PDFException
public TextSelection selectText(Rectangle2D selectArea)
throws PDFException
PDFException
public TextSelection clearTextSelection()
throws PDFException
PDFExceptionpublic TextSelection getSelectedText()
public BufferedImage getImage(int width,
int height,
boolean keepAspect)
width - Width of the desired image.height - Height of the desired image.keepAspect - Flag to indicate whether the resized image should keep its aspect ratio.
public BufferedImage getSubImage(Rectangle2D pageArea,
double scale)
pageArea - The rectangle of interest in the page. This rectangle should be in PDF native resolution, 72 DPI.scale - The scale at which to render the image. Scale = 1.0 means no scaling.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||