public class PDFFormFiller
extends java.lang.Object
PDFFormFiller
represents a PDF FormFiller.
It defines methods to implement PDF form filling. Before call all methods in
this package, please note to call
at first.PDFDocument.loadForm()
PDFDocument
Modifier and Type | Method and Description |
---|---|
long |
getHandle()
Get the
PDFFormFiller handle. |
static void |
setActionHandler(long docHandle,
FormActionHandler actionHandler)
Set the action handler.
|
void |
setHighlightColor(int fieldType,
long color)
Set the highlight color for the form field.
|
void |
showHighlight(boolean show)
Whether to show the highlight of form field or not.
|
public long getHandle()
PDFFormFiller
handle.PDFFormFiller
handle.public static void setActionHandler(long docHandle, FormActionHandler actionHandler) throws PDFException
Some interaction features such as performing JavaScript actions or filling the form, would require caller to implement the callback functions of action handler, in order to function well.
actionHandler
- A FormActionHandler
object.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
FormActionHandler
public void setHighlightColor(int fieldType, long color) throws PDFException
fieldType
- The form field type, please refer to constant definitions
TYPE_XXX
in the
PDFFormField
class.color
- The color value in ARGB format.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException
,
PDFFormField
public void showHighlight(boolean show) throws PDFException
show
- Whether to highlight the form field or not.PDFException
- For more exception information please see definitions
PDFException.ERRCODE_XXX
.PDFException