|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Page
Instances of this class provide access to the text and attributes of a page extracted from a PDF document.
Method Summary | |
---|---|
Page |
crop(Region area)
Returns a Page instance that contains only the content held by
this Page instance that intersects the given "query" area. |
PDFTextStreamConfig |
getConfig()
Returns the PDFTextStreamConfig instance provided to this page by its parent PDFTextStream
instance. |
Region |
getCropBox()
The "crop box" defined by the PDF for this page, expressed in user space units as with getPageHeight() and getPageWidth() . |
int |
getPageHeight()
Returns the height of this page in PDF "default user space units" (as specified by the PDF spec). |
int |
getPageNumber()
Returns this Page's page number. |
int |
getPageWidth()
Returns the width of this page in PDF "default user space units" (as specified by the PDF spec). |
java.lang.String |
getPdfName()
Returns the name of the PDF document from which this Page was extracted. |
int |
getRotationTheta()
Returns the number of degrees by which the page has been rotated clockwise. |
PDFTextStream |
getStream()
Returns the PDFTextStream instance from which this Page was sourced. |
BlockParent |
getTextContent()
Returns a BlockParent instance that contains all Block instances held by this Page, which in turn hold all text content for this Page. |
void |
pipe(OutputHandler tgt)
Extracts all text from this page, sending necessary events to the given OutputHandler implementation. |
Method Detail |
---|
PDFTextStream getStream()
PDFTextStream
instance from which this Page was sourced.
java.lang.String getPdfName()
int getPageNumber()
int getPageWidth()
int getPageHeight()
Region getCropBox()
getPageHeight()
and getPageWidth()
. This rectangle will default to the page
width and height if it is not otherwise specified.
int getRotationTheta()
void pipe(OutputHandler tgt) throws java.io.IOException
OutputHandler
implementation.
Unless custom text event handling is required, using an OutputTarget
is the easiest way to
take advantage of this function.
java.io.IOException
BlockParent getTextContent()
PDFTextStreamConfig getConfig()
PDFTextStreamConfig
instance provided to this page by its parent PDFTextStream
instance.
Page crop(Region area)
Page
instance that contains only the content held by
this Page
instance that intersects the given "query" area.
If all of the content held by this instance is intersected by the query area, then this
instance may be returned unchanged. If no content in this Page
intersects the query area, then an empty Page
instance will be
returned.
java.lang.UnsupportedOperationException
- if this Page
implementation does not support
the crop(Region) functionBlock.crop(Region)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |