public interface IPDFPage
Modifier and Type | Method and Description |
---|---|
Vector<TextPosition> |
findText(String searchText,
boolean caseSensitive,
boolean wholeWords)
This method searches for the given text in the page.
|
Vector<TextPosition> |
findTextUsingRegex(String regex)
This method searches for the given text in the page.
|
Vector<TextPositionWithContext> |
findTextWithContext(String searchText,
boolean caseSensitive,
boolean wholeWords)
This method searches for the given text in the page.
|
Vector<TextPositionWithContext> |
findTextWithContextUsingRegEx(String regex)
This method searches for text in the page for matches with the given regular expression.
|
Vector<Annotation> |
getAnnotations()
Returns a list of PDF annotations in this page.
|
Rectangle2D |
getArtBox()
Return this page's Art Box.
|
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.
|
IPDFDocument |
getIDocument()
Returns the document that this page belongs to.
|
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 |
getPageIndex()
This method returns the index of this page in its parent document.
|
int |
getPageRotation()
Returns the rotation of this page in degrees.
|
String |
getTabbingOrder()
Returns the tabbing order as defined in the page description, if present.
|
String |
getText()
Returns the text content of this page as a
String . |
TextSelection |
getTextInArea(Rectangle2D selectArea)
Selects the text in an area of the page.
|
TextSelection |
getTextWithCursors(Point2D startCursor,
Point2D endCursor)
Returns the text contained between the start and end cursors, in "reading mode".
|
Rectangle2D |
getTrimBox()
Return this page's Trim Box.
|
void |
paintPage(Graphics2D g2d)
Paints this page to the given graphics object.
|
void |
paintPage(Graphics2D g2d,
boolean paintAnnotations)
Paints this page to the given graphics object, with an option to paint the annotations on the page.
|
void |
printPage(Graphics2D g2d,
PageFormat pf,
PrintSettings printSettings)
Prints this page given a page format describing the printer's page and
a PrintSettings object.
|
Rectangle2D getMediaBox()
Rectangle2D getCropBox()
Rectangle2D getBleedBox()
Rectangle2D getTrimBox()
Rectangle2D getArtBox()
void paintPage(Graphics2D g2d)
g2d
- Graphics objects to paint the page to.void paintPage(Graphics2D g2d, boolean paintAnnotations)
g2d
- Graphics objects to paint the page to.paintAnnotations
- Flag indicating whether annotations should be paintedvoid printPage(Graphics2D g2d, PageFormat pf, PrintSettings printSettings) throws PDFException
g2d
- Printer graphics object.pf
- PageFormat object to use when printing.printSettings
- Printing preferences.PDFException
double getDisplayHeight()
double getDisplayWidth()
double getDisplayX()
double getDisplayY()
int getPageRotation()
int getPageIndex()
Vector<Annotation> getAnnotations() throws PDFException
PDFException
BufferedImage getImage(int width, int height, boolean keepAspect) throws PDFException
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.PDFException
Vector<TextPositionWithContext> findTextWithContext(String searchText, boolean caseSensitive, boolean wholeWords) throws PDFException
searchText
- The text to search for.caseSensitive
- Flag to determine if the search should be case sensitive.wholeWords
- Flag to indicate if only whole words should be foundPDFException
Vector<TextPositionWithContext> findTextWithContextUsingRegEx(String regex) throws PDFException
regex
- The regular expression to match against.PDFException
Vector<TextPosition> findText(String searchText, boolean caseSensitive, boolean wholeWords) throws PDFException
searchText
- The text to search for.caseSensitive
- Flag to determine if the search should be case sensitive.wholeWords
- Flag to indicate if only whole words should be foundPDFException
Vector<TextPosition> findTextUsingRegex(String regex) throws PDFException
regex
- The regular expression to search for.PDFException
String getTabbingOrder()
TextSelection getTextWithCursors(Point2D startCursor, Point2D endCursor) throws PDFException
startCursor
- the location where the cursor should start selectionendCursor
- The location where the cursor ends selectionPDFException
TextSelection getTextInArea(Rectangle2D selectArea) throws PDFException
PDFException
String getText() throws PDFException
String
.PDFException
IPDFDocument getIDocument()