public class CPDFPage
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CPDFPage.PDFFlattenOption
flatten options
|
Modifier and Type | Field and Description |
---|---|
static java.lang.Object |
lockObj |
Modifier and Type | Method and Description |
---|---|
CPDFAnnotation |
addAnnot(CPDFAnnotation.Type type,
CPDFDocument document)
Adds annotations on page according to the type of annotation, more:
CPDFAnnotation.Type |
CPDFWidget |
addFormWidget(CPDFWidget.WidgetType type,
CPDFDocument document)
Adds a form widget on the page according to the type of form widgets.
|
boolean |
applyRedactions()
Applies redaction annotations in current page.
|
void |
close()
When the object is no longer in use, call this method to release resources.
|
boolean |
deleteAnnotation(CPDFAnnotation annotation)
Removes the specified annotation from the page.
|
boolean |
extractImages(java.lang.String filePath)
Exports all the images on the page.
|
boolean |
flatten(CPDFPage.PDFFlattenOption flattenOption)
Flatten annotations and form fields into the page contents.
|
java.util.List<CPDFAnnotation> |
getAnnotations()
Gets all the annotation collections on the page.
|
int |
getAnnotCount()
Gets the count of annotations on the page.
|
RectF |
getBounds()
not in use currently
|
int |
getPageNum() |
long |
getPagePtr()
Get the page pointer in the native layer.
|
int |
getRotation()
Gets the rotation angle for the page in degrees.
|
RectF |
getSize()
Gets page size, the width isc
android.graphics.RectF#width() , the height isandroid.graphics.RectF#height() |
boolean |
isValid()
Whether object is valid.
|
void |
releaseAllAnnotations()
Releases all annotation resources on the page.
|
void |
setPageNum(int pageNum) |
boolean |
setRotation(int rotation)
Sets the rotation angle for the page in degrees.
|
public int getPageNum()
public void setPageNum(int pageNum)
public RectF getBounds()
public RectF getSize()
android.graphics.RectF#width()
, the height isandroid.graphics.RectF#height()
public int getRotation()
public boolean setRotation(int rotation)
rotation
- Rotation on a page. Must be 0, 90, 180 or 270.public boolean flatten(CPDFPage.PDFFlattenOption flattenOption)
flattenOption
- One of the flattenOption values denoting the page usage, more CPDFPage.PDFFlattenOption
public int getAnnotCount()
public java.util.List<CPDFAnnotation> getAnnotations()
public boolean deleteAnnotation(CPDFAnnotation annotation)
annotation
- The specified annotation to be removedpublic CPDFAnnotation addAnnot(CPDFAnnotation.Type type, CPDFDocument document)
CPDFAnnotation.Type
type
- The type of annotation to be added, more: CPDFAnnotation.Type
document
- This class is about CPDFDocument, one CPDFDocument class for one document.public boolean applyRedactions()
public boolean extractImages(java.lang.String filePath)
filePath
- Exports image to specified path.public CPDFWidget addFormWidget(CPDFWidget.WidgetType type, CPDFDocument document)
CPDFAnnotation.Type
type
- Type of form widgets, more: CPDFAnnotation.Type
document
- This class is about CPDFDocument, one CPDFDocument class for one document.public long getPagePtr()
public boolean isValid()
public void releaseAllAnnotations()
public void close()