Foxit PDF SDK
|
Public Member Functions | |
FillSign (PDFPage page) throws com.foxit.sdk.PDFException | |
Constructor, from a PDF page object. More... | |
FillSign (FillSign other) | |
Constructor, with another FillSign object. More... | |
FillSignObject | addObject (int type, PointF point, float width, float height, int rotation) throws com.foxit.sdk.PDFException |
Add a new fill-sign object (except text fill-sign object) to related PDF page (which is used in constructor). More... | |
FillSignObject | addTextObject (TextFillSignObjectDataArray text_data, PointF point, float width, float height, int rotation, boolean is_comb_field_mode) throws com.foxit.sdk.PDFException |
Add a new text fill-sign object to related PDF page (which is used in constructor). More... | |
synchronized void | delete () |
Clean up related resources immediately. More... | |
FillSignObject | getObjectAtDevicePoint (PointF point, Matrix2D matrix) throws com.foxit.sdk.PDFException |
Get a fill-sign object by specified point in device coordinate system. More... | |
FillSignObject | getObjectAtPoint (PointF point) throws com.foxit.sdk.PDFException |
Get a fill-sign object by specified point in PDF coordinate system. More... | |
boolean | isEmpty () |
Check whether current object is empty or not. More... | |
boolean | removeObject (FillSignObject fillsign_object) throws com.foxit.sdk.PDFException |
Remove a specified fill-sign object. More... | |
![]() | |
synchronized void | delete () |
Clean up related resources immediately. More... | |
Static Public Attributes | |
static final int | e_FillSignObjectTypeCheckMark = 2 |
Check mark fill-sign object. | |
static final int | e_FillSignObjectTypeCrossMark = 1 |
Cross mark fill-sign object. | |
static final int | e_FillSignObjectTypeDot = 5 |
Dot fill-sign object. | |
static final int | e_FillSignObjectTypeInitialsSignature = 7 |
Initials signature fill-sign object. | |
static final int | e_FillSignObjectTypeLine = 4 |
Line fill-sign object. | |
static final int | e_FillSignObjectTypeRoundRectangle = 3 |
Round rectangle fill-sign object. | |
static final int | e_FillSignObjectTypeSignature = 6 |
Signature fill-sign object. | |
static final int | e_FillSignObjectTypeText = 0 |
Text fill-sign object. | |
Fill-sign means to fill some graphics objects to PDF page and sign them. This class is used as a manager for fill-sign objects. User can use this class to add/get/remove fill-sign objects (including cross mark, check mark, dot, line, round rectangle, signature and initials signature) to PDF page.
com.foxit.sdk.pdf.FillSign.FillSign | ( | PDFPage | page | ) | throws com.foxit.sdk.PDFException |
Constructor, from a PDF page object.
Please ensure input PDF page has been parsed successfully.
[in] | page | A valid PDF page object. |
com.foxit.sdk.pdf.FillSign.FillSign | ( | FillSign | other | ) |
Constructor, with another FillSign object.
[in] | other | Another object. |
FillSignObject com.foxit.sdk.pdf.FillSign.addObject | ( | int | type, |
PointF | point, | ||
float | width, | ||
float | height, | ||
int | rotation | ||
) | throws com.foxit.sdk.PDFException |
Add a new fill-sign object (except text fill-sign object) to related PDF page (which is used in constructor).
This function can be used to add fill-sign object except type com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeText . If you want to add a fill-sign object with type com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeText , please call function FillSign.addTextObject instead.
If PDF document (to which related PDF page belongs) has form fields, this function can only support to add fill-sign objects with types com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeSignature and com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeInitialsSignature . In this case, if to add fill-sign with other types, this fucntion will throw com.foxit.sdk.common.Constants.e_ErrUnsupported .
If to add a fill-sign object with type com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeCrossMark , com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeCheckMark , com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeLine or com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeDot , the bigger value of input width and height will be used as both width and height for the new fill-sign object.
If to add a fill-sign object with type com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeLine , input height is useless and will be ignored.
[in] | type | Fill-sign type which is used to specify what kind of fill-sign object is to be added. Please refer to values starting from com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeCrossMark and this should be one of these values. |
[in] | point | Left-bottom point for new fill-sign object, in PDF coordinate system. |
[in] | width | Width for new fill-sign object. |
[in] | height | Height for new fill-sign object. |
[in] | rotation | Rotation status information. This rotation value includes the view rotation and page ratation property information. Please refer to values starting from com.foxit.sdk.common.Constants.e_Rotation0 and this should be one of these values except com.foxit.sdk.common.Constants.e_RotationUnknown . |
FillSignObject com.foxit.sdk.pdf.FillSign.addTextObject | ( | TextFillSignObjectDataArray | text_data, |
PointF | point, | ||
float | width, | ||
float | height, | ||
int | rotation, | ||
boolean | is_comb_field_mode | ||
) | throws com.foxit.sdk.PDFException |
Add a new text fill-sign object to related PDF page (which is used in constructor).
[in] | text_data | A text data array to be set to new text fill-sign object. For each text fill-sign object data, origin_position of member text_state will not be used. |
[in] | point | Left-bottom point for new fill-sign object, in PDF coordinate system. |
[in] | width | Width for new fill-sign object. |
[in] | height | Height for new fill-sign object. |
[in] | rotation | Rotation status information. This rotation value includes the view rotation and page ratation property information. Please refer to values starting from com.foxit.sdk.common.Constants.e_Rotation0 and this should be one of these values except com.foxit.sdk.common.Constants.e_RotationUnknown . |
[in] | is_comb_field_mode | A boolean value to decide whether for comb field mode or normal mode:
|
synchronized void com.foxit.sdk.pdf.FillSign.delete | ( | ) |
Clean up related resources immediately.
FillSignObject com.foxit.sdk.pdf.FillSign.getObjectAtDevicePoint | ( | PointF | point, |
Matrix2D | matrix | ||
) | throws com.foxit.sdk.PDFException |
Get a fill-sign object by specified point in device coordinate system.
After adding the fill-sign object with type com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeSignature or com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeInitialsSignature ,all the existed fill-sign objects which belong to the same PDF document cannot be retrieved.
[in] | point | A specified point in device coordinate system. |
[in] | matrix | A transform matrix from device coordinate system to PDF coordinate system. |
FillSignObject com.foxit.sdk.pdf.FillSign.getObjectAtPoint | ( | PointF | point | ) | throws com.foxit.sdk.PDFException |
Get a fill-sign object by specified point in PDF coordinate system.
After adding a fill-sign object with type com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeSignature or com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeInitialsSignature , all the existed fill-sign objects which belong to the same PDF document cannot be retrieved.
[in] | point | A specified point in PDF coordinate system. |
boolean com.foxit.sdk.pdf.FillSign.isEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
boolean com.foxit.sdk.pdf.FillSign.removeObject | ( | FillSignObject | fillsign_object | ) | throws com.foxit.sdk.PDFException |
Remove a specified fill-sign object.
After adding a fill-sign object with type com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeSignature or com.foxit.sdk.pdf.FillSign.e_FillSignObjectTypeInitialsSignature , all the existed fill-sign objects which belong to the same PDF document cannot be removed. For this case, this function will return false if any existed fill-sign object is to be removed.
[in] | fillsign_object | A fill-sign object to be removed. |