public class PDFPage
extends com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
Modifier and Type | Field and Description |
---|---|
static int |
COMPRESSION_DEFLATE |
static int |
COMPRESSION_JBIG2 |
static int |
COMPRESSION_JPEG |
Modifier and Type | Method and Description |
---|---|
void |
addAnnotation(Annotation annot)
Adds a new annotation to this page.
|
void |
addJPEGImage(File jpegFile,
int x,
int y,
AffineTransform xform)
Adds a JPEG image onto this page.
|
SignatureField |
addSignatureField(String fieldName,
Rectangle2D bounds)
Adds a signature field to this page.
|
void |
appendPageContent(PDFPage srcPage,
double x,
double y,
double scaleX,
double scaleY,
Layer layer)
Adds the content of another page to this page.
|
boolean |
applyRedactionAnnotation(Redaction redactionAnnot)
This method will apply or "burn in" the redaction annotation.
|
boolean |
applyRedactionAnnotations()
This method will apply or "burn in" all redaction annotations that are on
this
PDFPage . |
boolean |
containsInvisibleText()
Checks whether the page contains text which is invisible.
|
Annotation |
copyAnnotation(Annotation annot)
Use this method to copy a single annotation onto this page, from this or other documents.
|
void |
copyAnnotations(PDFPage srcPage)
Use this method to copy annotations onto this page, from this or other
documents.
|
void |
copyAnnotations(PDFPage srcPage,
Layer layer)
Use this method to copy annotations onto this page, from this or other
documents.
|
Graphics2D |
createGraphics()
Creates a Graphics2D object to draw into this page.
|
Graphics2D |
createGraphics(Layer layer)
Creates a graphics object that encapsulates a layer in a PDF document.
|
void |
deleteAnnotations()
Deprecated.
Use
deleteAnnotations(List) instead. |
int |
deleteAnnotations(List<? extends Annotation> annots)
Deletes a list of annotations on the page.
|
void |
drawImage(Image image,
int dstX,
int dstY,
Color bgndColor,
AffineTransform xform,
ImageCompression imageSettings)
Draws an image onto this page.
|
void |
drawImage(Image image,
int dstX,
int dstY,
int dstWidth,
int dstHeight,
Color bgndColor,
AffineTransform xform,
ImageCompression imageSettings)
Draws an image onto this page.
|
void |
drawImage(Image image,
int dstX,
int dstY,
int dstWidth,
int dstHeight,
Color bgndColor,
AffineTransform xform,
ImageCompression params,
Float alpha)
Draws an image onto this page.
|
void |
drawText(String str,
Font font,
Paint textPaint,
double x,
double y,
AffineTransform xform)
Draw text to this page using Java Font
|
void |
fillShape(Shape shape,
Paint shapePaint,
double offsetX,
double offsetY,
AffineTransform xform)
Fills a shape on this page.
|
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 regexString)
This method searches for text in the page for matches with the given regular expression.
|
Object |
flattenAnnotation(Annotation annot)
Flatten an annotation into the content.
|
Object |
flattenAnnotations(boolean paintNonPrintableAnnots)
Flattens the annotations.
|
void |
flattenWidget(Widget widget)
Flatten a widget into the content layer of the page.
|
Vector<Annotation> |
getAnnotations()
Returns a list of PDF annotations in this page, including form fields widgets.
|
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.
|
PDFDocument |
getDocument()
Returns the document that this page belongs to.
|
BufferedImage |
getImage()
Returns a BufferedImage containing a rendering
of the page at the default PDF resolution: 72 DPI.
|
BufferedImage |
getImage(int dpi)
Returns a BufferedImage containing a rendering
of the page at the given resolution in DPI.
|
BufferedImage |
getImage(int width,
int height,
boolean keepAspect)
Returns a buffered image showing the contents of this page.
|
BufferedImage |
getImageCS(int dpi,
ColorSpace imageCS)
Returns a BufferedImage, created in the given color space, containing a rendering of the page at the given resolution in DPI.
|
BufferedImage |
getImageCS(int dpi,
ColorSpace imageCS,
boolean simOverprint)
Returns a BufferedImage, created in the given color space, containing a rendering of the page at the given resolution in DPI.
|
Rectangle2D |
getMediaBox()
Returns this page's Media Box.
|
int |
getPageIndex()
Gets the page index of this page within the document.
|
String |
getPageLabel()
Returns the page label for this page.
|
int |
getPageRotation()
Returns the rotation of this page in degrees.
|
double |
getPaperHeight()
Returns the paper's height of this page in 72 DPI.
|
double |
getPaperWidth()
Returns the paper's width of this page in 72 DPI.
|
BufferedImage |
getSubImage(Rectangle2D pageArea,
int dpi)
Returns an image for part of the page.
|
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 . |
com.qoppa.pdfProcess.content.TextContent |
getTextContent()
This method returns a TextContent object that represents the text content in a page.
|
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 |
insert_hOCR(String hocrText,
boolean renderText)
This methods inserts hOCR text into this page.
|
boolean |
isEmpty()
Check whether the page is empty.
|
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 |
prependPageContent(PDFPage srcPage,
double x,
double y,
double scaleX,
double scaleY,
Layer layer)
Prepend the contents of another page to this 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.
|
void |
removeAnnotation(Annotation annot)
Removes an annotation from this page.
|
void |
resizePage(ResizePageOptions options)
Sets this page's Media Box.
|
void |
savePageAsGIF(OutputStream outStream,
int dpi)
Render the page as an image and save it to the output stream in GIF format.
|
void |
savePageAsJPEG(OutputStream outStream,
int dpi,
float quality)
Render the page as an image and save it to the output stream in JPEG format.
|
void |
savePageAsJPEG2000(OutputStream outStream,
int dpi,
float quality)
Render the page as an image and save it to the output stream in JPEG2000 format.
|
void |
savePageAsPNG(OutputStream outStream,
int dpi)
Render the page as an image and save it to the output stream in PNG format.
|
void |
savePageAsTIFF(OutputStream outStream,
double resDPI,
String tiffCompression)
Save the rendering image of the page to the given OutputStream
in TIFF format.
|
void |
savePageAsTIFF(OutputStream outStream,
TIFFOptions options)
Render the page to an image and save it in TIFF format to the given OutputStream.
|
void |
setArtBox(Rectangle2D rect)
Sets this page's Art Box.
|
void |
setBleedBox(Rectangle2D rect)
Sets this page's Bleed Box.
|
void |
setClip(Area newClip)
Sets the clip area in the page's content stream when drawing to the page.
|
void |
setCropBox(Rectangle2D rect)
Sets the PDF page's 'CropBox'.
|
void |
setPageRotation(int degrees)
Changes this page's rotation.
|
void |
setTrimBox(Rectangle2D rect)
Sets this page's Trim Box.
|
void |
strokeShape(Shape shape,
Paint shapePaint,
double offsetX,
double offsetY,
AffineTransform xform)
Draws the outline of a shape on this page.
|
String |
useGradientPaint(GradientPaint paint) |
String |
useGState(double strokeAlpha,
double fillAlpha,
String blendName) |
drawAnnotations, findTextUsingRegex, getAbstractPDFDocument, getAdditionalActions, getColorSpace, getIDocument, getImage, getImageModel, getImageWithoutText, getImageWithoutTextGray, getPageTransform, getPageTransformWithoutMirror, getPDFGraphicsOperators, getShapes, getStreamWithResources, getTextInArea, getTextModel, hasText, invalidateTextModel, pageHasNoText, paintHighlights, paintPage, paintPageContent, setAdditionalActions, updateActionsDictionary
public static final int COMPRESSION_DEFLATE
public static final int COMPRESSION_JBIG2
public static final int COMPRESSION_JPEG
public void addAnnotation(Annotation annot) throws PDFException
addAnnotation
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
annot
- The annotation to add.PDFException
public void addJPEGImage(File jpegFile, int x, int y, AffineTransform xform) throws PDFException, IOException
jpegFile
- The JPEG file.x
- The horizontal position of the image in 72 DPI.y
- The vertical position of the image in 72 DPI.xform
- A transform to apply to the image before drawing it to the page. This parameter can be left null for no transform.PDFException
IOException
public SignatureField addSignatureField(String fieldName, Rectangle2D bounds) throws PDFException
PDFDocument.signDocument
.
To create an invisible signature field, the bound rectangle should be set to (0,0,0,0) for the bounds.fieldName
- The name of the new field.bounds
- The bounds of the field on the page. (0,0,0,0) indicates that the signature field will be invisible.PDFException
public void appendPageContent(PDFPage srcPage, double x, double y, double scaleX, double scaleY, Layer layer) throws PDFException
srcPage
- The source page to take the content stream from.x
- The X position on the destination page at which the upper left
corner of the source page will be placed.y
- The Y position on the destination page at which the upper left
corner of the source page will be placed.scaleX
- Horizontal scale to apply to the source page before adding it
to the destination page. The scale is 1 based, 1 = full scale.scaleY
- Vertical scale to apply to the source page before adding it to
the destination page. The scale is 1 based, 1 = full scale.layer
- The layer to append the source page content stream, or null.PDFException
IllegalArgumentException
- if layer is not null, layer must be from the target documentprependPageContent(PDFPage, double, double, double, double, Layer)
public Annotation copyAnnotation(Annotation annot) throws PDFException
PDFException
public void copyAnnotations(PDFPage srcPage) throws PDFException
srcPage
- The source page to copy annotations fromPDFException
public void copyAnnotations(PDFPage srcPage, Layer layer) throws PDFException
PDFPage
's PDFDocument
.srcPage
- The source page to copy annotations fromlayer
- The layer to add the annotations to, may be nullPDFException
public Graphics2D createGraphics() throws PDFException
PDFException
public Graphics2D createGraphics(Layer layer) throws PDFException
layer
- The layer to draw into. This object must be created through PDFDocument.addLayer()PDFException
public void deleteAnnotations() throws PDFException
deleteAnnotations(List)
instead.PDFException
public void drawImage(Image image, int dstX, int dstY, Color bgndColor, AffineTransform xform, ImageCompression imageSettings) throws PDFException
image
- The image to draw.dstX
- The horizontal position of the image in 72 DPI.dstY
- The vertical position of the image in 72 DPI.bgndColor
- The background color if any. If this parameter is not null, the method will first
fill a rectangle with this color where the image will be drawn, then draw the image on top.xform
- A transform to apply to the image before drawing it to the page. This parameter can be left null for no transform.imageSettings
- An ImageCompression object describing what compression to use when writing images to the PDF document. If null, the
library will use default settings.PDFException
public void drawImage(Image image, int dstX, int dstY, int dstWidth, int dstHeight, Color bgndColor, AffineTransform xform, ImageCompression imageSettings) throws PDFException
image
- The image to draw.dstX
- The horizontal position of the image in 72 DPI.dstY
- The vertical position of the image in 72 DPI.dstWidth
- The width on the page that the image will occupy. If this is <= 0, the method will use the image's width.dstHeight
- The height on the page that the image will occupy. If this is <= 0, the method will use the image's height.bgndColor
- The background color if any. If this parameter is not null, the method will first
fill a rectangle with this color where the image will be drawn, then draw the image on top.xform
- A transform to apply to the image before drawing it to the page. This parameter can be left null for no transform.imageSettings
- An ImageCompression object describing what compression to use when writing images to the PDF document. If null, the
library will use default settings.PDFException
public void drawImage(Image image, int dstX, int dstY, int dstWidth, int dstHeight, Color bgndColor, AffineTransform xform, ImageCompression params, Float alpha) throws PDFException
image
- The image to draw.dstX
- The horizontal position of the image in 72 DPI.dstY
- The vertical position of the image in 72 DPI.dstWidth
- The width on the page that the image will occupy. If this is <= 0, the method will use the image's width.dstHeight
- The height on the page that the image will occupy. If this is <= 0, the method will use the image's height.bgndColor
- The background color if any. If this parameter is not null, the method will first
fill a rectangle with this color where the image will be drawn, then draw the image on top.xform
- A transform to apply to the image before drawing it to the page. This parameter can be left null for no transform.params
- An ImageCompression object describing what compression to use when writing images to the PDF document. If null, the
library will use default settings.alpha
- The alpha component to display the image with transparencyPDFException
public void drawText(String str, Font font, Paint textPaint, double x, double y, AffineTransform xform) throws PDFException
str
- The string to draw on the page.font
- The font to use when drawing the text.textPaint
- The color to use when drawing the text.x
- The horizontal position of the text on the page, in 72 DPI.y
- The vertical position of the text on the page, in 72 DPI.xform
- A transform to apply to the text before drawing it to the page.PDFException
public void fillShape(Shape shape, Paint shapePaint, double offsetX, double offsetY, AffineTransform xform)
shape
- The shape to fill.shapePaint
- The color to use when filling the shape.offsetX
- A horizontal offset to apply before drawing the shape, in 72 DPI.offsetY
- A vertical offset to apply before drawing the shape, in 72 DPI.xform
- A transform to apply to the shape before drawing it to the page.public Vector<TextPosition> findText(String searchText, boolean caseSensitive, boolean wholeWords) throws PDFException
findText
in interface IPDFPage
findText
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
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
public TextSelection getTextWithCursors(Point2D startCursor, Point2D endCursor) throws PDFException
getTextWithCursors
in interface IPDFPage
getTextWithCursors
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
startCursor
- the location where the cursor should start selectionendCursor
- The location where the cursor ends selectionPDFException
public TextSelection getTextInArea(Rectangle2D selectArea) throws PDFException
getTextInArea
in interface IPDFPage
getTextInArea
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
PDFException
public Object flattenAnnotation(Annotation annot) throws PDFException
annot
- The annotation to flatten.PDFException
public Object flattenAnnotations(boolean paintNonPrintableAnnots) throws PDFException
flattenAnnotations
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
paintNonPrintableAnnots
- Flag to indicate whether non-printable annotations should be
painted or not.PDFException
public int deleteAnnotations(List<? extends Annotation> annots) throws PDFException
annots
- The list of annotations that should be deleted.PDFException
- Thrown when there is any errors parsing PDF content.public void flattenWidget(Widget widget) throws PDFException
widget
- The widget to flattenPDFException
public PDFDocument getDocument()
public BufferedImage getImage() throws PDFException
PDFException
public BufferedImage getImageCS(int dpi, ColorSpace imageCS) throws PDFException
dpi
- Dots per inch at which to render the image.imageCS
- The color space to use when creating the image.PDFException
public BufferedImage getImageCS(int dpi, ColorSpace imageCS, boolean simOverprint) throws PDFException
dpi
- Dots per inch at which to render the image.imageCS
- The color space to use when creating the image.simOverprint
- Flag indicating whether the renderer should simulate overprinting.PDFException
public BufferedImage getImage(int dpi) throws PDFException
dpi
- Dots per inch at which to render the image.PDFException
public int getPageIndex()
getPageIndex
in interface IPDFPage
getPageIndex
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public String getPageLabel() throws PDFException
getPageLabel
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
PDFException
public double getPaperHeight()
public double getPaperWidth()
public BufferedImage getSubImage(Rectangle2D pageArea, int dpi) throws PDFException
pageArea
- The area of the page to get an image for.dpi
- The desired resolution for the image.PDFException
public boolean isEmpty() throws PDFException
PDFException
public void prependPageContent(PDFPage srcPage, double x, double y, double scaleX, double scaleY, Layer layer) throws PDFException
srcPage
- The source page to take the content stream from.x
- The X position on the destination page at which the upper left
corner of the source page will be placedy
- The Y position on the destination page at which the upper left
corner of the source page will be placedscaleX
- Horizontal scale to apply to the source page before adding it
to the destination page.scaleY
- Vertical scale to apply to the source page before adding it to
the destination page.layer
- The layer to append the source page content stream, or null.PDFException
IllegalArgumentException
- if layer is not null, layer must be from the target documentappendPageContent(PDFPage, double, double, double, double, Layer)
public void removeAnnotation(Annotation annot) throws PDFException
annot
- A reference to the annotation that needs to be removed.PDFException
public void savePageAsGIF(OutputStream outStream, int dpi) throws PDFException, IOException
outStream
- The stream to save the image to.dpi
- Dots per inch at which to render the image. 72 is the native PDF resolution.PDFException
IOException
public void savePageAsJPEG(OutputStream outStream, int dpi, float quality) throws IOException, PDFException
outStream
- The stream to save the image to.dpi
- Dots per inch at which to render the image. 72 is the native PDF resolution.quality
- The quality setting to use for JPEG compression. The range for this value is 0.0 to 1.0.
Lower values mean higher compression and lower quality. As a guideline, 0.25 is low quality, 0.5 is medium
quality and 0.75 is high quality.IOException
PDFException
public void savePageAsJPEG2000(OutputStream outStream, int dpi, float quality) throws IOException, PDFException
outStream
- The stream to save the image to.dpi
- Dots per inch at which to render the image. 72 is the native PDF resolution.quality
- The quality setting to use for JPEG compression. The range for this value is 0.0 to 1.0.
Lower values mean higher compression and lower quality. As a guideline, 0.25 is low quality, 0.5 is medium
quality and 0.75 is high quality.IOException
PDFException
public void savePageAsPNG(OutputStream outStream, int dpi) throws PDFException, IOException
outStream
- The stream to save the image to.dpi
- Dots per inch at which to render the image. 72 is the native PDF resolution.PDFException
IOException
public void savePageAsTIFF(OutputStream outStream, double resDPI, String tiffCompression) throws IOException, PDFException
outStream
- The stream to save the image to.resDPI
- Dots per inch at which to render the image.tiffCompression
- The type of TIFF compression to use. This value needs to be one of
these predefined values:IOException
PDFException
public void savePageAsTIFF(OutputStream outStream, TIFFOptions options) throws IOException, PDFException
outStream
- The stream to save the image to.options
- Options when saving the image, such as the output DPI, the TIFF compression method and more.IOException
PDFException
public void setArtBox(Rectangle2D rect)
rect
- The new art box. The dimensions are given in PostScript
points. 1 inch = 72 points, 1cm = 28.3465 points, 1mm = 2.8346 pointspublic void setBleedBox(Rectangle2D rect)
rect
- The new bleed box. The dimensions are given in PostScript
points. 1 inch = 72 points, 1cm = 28.3465 points, 1mm = 2.8346 pointspublic void setClip(Area newClip) throws PDFException
newClip
- The new clip area.PDFException
public void setCropBox(Rectangle2D rect) throws PDFException
rect
- The new crop box. The dimensions are given in PostScript
points. 1 inch = 72 points, 1cm = 28.3465 points, 1mm = 2.8346 pointsPDFException
public void resizePage(ResizePageOptions options) throws PDFException
options
- The resize page options.PDFException
public void setPageRotation(int degrees) throws PDFException
degrees
- The new page rotation, in degreesPDFException
public void setTrimBox(Rectangle2D rect)
rect
- The new trim box. The dimensions are given in PostScript
points. 1 inch = 72 points, 1cm = 28.3465 points, 1mm = 2.8346 pointspublic void strokeShape(Shape shape, Paint shapePaint, double offsetX, double offsetY, AffineTransform xform)
shape
- The shape whose outline will be drawn.shapePaint
- The color to use when drawing the outline of the shape.offsetX
- A horizontal offset to apply before drawing the shape, in 72 DPI.offsetY
- A vertical offset to apply before drawing the shape, in 72 DPI.xform
- A transform to apply to the shape before drawing it to the page.public String useGradientPaint(GradientPaint paint) throws PDFException
PDFException
public String useGState(double strokeAlpha, double fillAlpha, String blendName) throws PDFException
PDFException
public void insert_hOCR(String hocrText, boolean renderText) throws PDFException
hocrText
- The hOCR text content.renderText
- Flag indicating whether the text should be shown on the page. If the flag is false, the text is added in "No Render" mode.
Text that uses this mode is present in the page and it is selectable, but it is not visible.PDFException
public boolean applyRedactionAnnotations() throws PDFException
PDFPage
. The page content that is contained within the
redaction annotation's bounds will be redacted.PDFPage
contains ANY redaction annotations that were burned in. If there are no
redaction annotations, this method returns false.
otherwise false.PDFException
public boolean applyRedactionAnnotation(Redaction redactionAnnot) throws PDFException
PDFPage
. The
page content that is contained within the redaction annotation's bounds
will be redacted.PDFPage
contains the redaction annotation that was passed in and the content was redacted, false otherwise.PDFException
public Rectangle2D getMediaBox()
getMediaBox
in interface IPDFPage
getMediaBox
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public Rectangle2D getCropBox()
getCropBox
in interface IPDFPage
getCropBox
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public Rectangle2D getBleedBox()
getBleedBox
in interface IPDFPage
getBleedBox
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public Rectangle2D getTrimBox()
getTrimBox
in interface IPDFPage
getTrimBox
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public Rectangle2D getArtBox()
public void paintPage(Graphics2D g2d)
public void paintPage(Graphics2D g2d, boolean paintAnnotations)
public void printPage(Graphics2D g2d, PageFormat pf, PrintSettings printSettings) throws PDFException
printPage
in interface IPDFPage
printPage
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
g2d
- Printer graphics object.pf
- PageFormat object to use when printing.printSettings
- Printing preferences.PDFException
public double getDisplayHeight()
getDisplayHeight
in interface IPDFPage
getDisplayHeight
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public double getDisplayWidth()
getDisplayWidth
in interface IPDFPage
getDisplayWidth
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public double getDisplayX()
getDisplayX
in interface IPDFPage
getDisplayX
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public double getDisplayY()
getDisplayY
in interface IPDFPage
getDisplayY
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public int getPageRotation()
getPageRotation
in interface IPDFPage
getPageRotation
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public Vector<Annotation> getAnnotations() throws PDFException
getAnnotations
in interface IPDFPage
getAnnotations
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
PDFException
public BufferedImage getImage(int width, int height, boolean keepAspect) throws PDFException
getImage
in interface IPDFPage
getImage
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
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
public Vector<TextPositionWithContext> findTextWithContext(String searchText, boolean caseSensitive, boolean wholeWords) throws PDFException
findTextWithContext
in interface IPDFPage
findTextWithContext
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
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
public String getTabbingOrder()
getTabbingOrder
in interface IPDFPage
getTabbingOrder
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
public String getText() throws PDFException
String
.getText
in interface IPDFPage
getText
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
PDFException
public boolean containsInvisibleText() throws PDFException
PDFException
public Vector<TextPositionWithContext> findTextWithContextUsingRegEx(String regexString) throws PDFException
findTextWithContextUsingRegEx
in interface IPDFPage
findTextWithContextUsingRegEx
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
regexString
- The regular expression to match against.PDFException
public Vector<TextPosition> findTextUsingRegex(String regex) throws PDFException
findTextUsingRegex
in interface IPDFPage
findTextUsingRegex
in class com.qoppa.pdfViewer.hiObjects.AbstractPDFPage
regex
- The regular expression to search for.PDFException
public com.qoppa.pdfProcess.content.TextContent getTextContent() throws PDFException
PDFException