public class PdfAcroForm extends PdfDictionary
Constructor and Description |
---|
PdfAcroForm(PdfWriter writer)
Creates new PdfAcroForm
|
Modifier and Type | Method and Description |
---|---|
void |
addCalculationOrder(PdfFormField formField)
Adds an object to the calculationOrder.
|
PdfFormField |
addCheckBox(String name,
String value,
boolean status,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addComboBox(String name,
String[][] options,
String defaultValue,
boolean editable,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addComboBox(String name,
String[] options,
String defaultValue,
boolean editable,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
void |
addDocumentField(PdfIndirectReference ref)
Adds documentFields.
|
void |
addFieldTemplates(HashMap ft)
Deprecated.
|
void |
addFieldTemplates(Map<PdfTemplate,Object> ft)
Adds fieldTemplates.
|
void |
addFormField(PdfFormField formField)
Adds a formfield to the AcroForm.
|
PdfFormField |
addHiddenField(String name,
String value) |
PdfFormField |
addHtmlPostButton(String name,
String caption,
String value,
String url,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addMap(String name,
String value,
String url,
PdfContentByte appearance,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addMultiLineTextField(String name,
String text,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addRadioButton(PdfFormField radiogroup,
String value,
float llx,
float lly,
float urx,
float ury) |
void |
addRadioGroup(PdfFormField radiogroup) |
PdfFormField |
addResetButton(String name,
String caption,
String value,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addSelectList(String name,
String[][] options,
String defaultValue,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addSelectList(String name,
String[] options,
String defaultValue,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addSignature(String name,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addSingleLinePasswordField(String name,
String text,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
addSingleLineTextField(String name,
String text,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
void |
drawButton(PdfFormField button,
String caption,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
void |
drawCheckBoxAppearences(PdfFormField field,
String value,
float llx,
float lly,
float urx,
float ury) |
void |
drawMultiLineOfText(PdfFormField field,
String text,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
void |
drawRadioAppearences(PdfFormField field,
String value,
float llx,
float lly,
float urx,
float ury) |
void |
drawSignatureAppearences(PdfFormField field,
float llx,
float lly,
float urx,
float ury) |
void |
drawSingleLineOfText(PdfFormField field,
String text,
BaseFont font,
float fontSize,
float llx,
float lly,
float urx,
float ury) |
PdfFormField |
getRadioGroup(String name,
String defaultValue,
boolean noToggleToOff) |
boolean |
isValid()
Checks if the Acroform is valid
|
void |
setButtonParams(PdfFormField button,
int characteristics,
String name,
String value) |
void |
setCheckBoxParams(PdfFormField field,
String name,
String value,
boolean status,
float llx,
float lly,
float urx,
float ury) |
void |
setChoiceParams(PdfFormField field,
String name,
String defaultValue,
float llx,
float lly,
float urx,
float ury) |
void |
setNeedAppearances(boolean value) |
void |
setSigFlags(int f)
Sets the signature flags.
|
void |
setSignatureParams(PdfFormField field,
String name,
float llx,
float lly,
float urx,
float ury) |
void |
setTextFieldParams(PdfFormField field,
String text,
String name,
float llx,
float lly,
float urx,
float ury) |
contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toPdf, toString
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
public void setNeedAppearances(boolean value)
@Deprecated public void addFieldTemplates(HashMap ft)
addFieldTemplates(Map)
ft
- field templatespublic void addFieldTemplates(Map<PdfTemplate,Object> ft)
ft
- field templatespublic void addDocumentField(PdfIndirectReference ref)
ref
- an object of PdfIndirectReference
public boolean isValid()
public void addCalculationOrder(PdfFormField formField)
formField
- an object of PdfFormField
public void setSigFlags(int f)
f
- signature flagpublic void addFormField(PdfFormField formField)
formField
- an object of PdfFormField
public PdfFormField addHtmlPostButton(String name, String caption, String value, String url, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldvalue
- value of the fieldurl
- url for the actioncaption
- captionfont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addResetButton(String name, String caption, String value, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldvalue
- value of the fieldcaption
- captionfont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addMap(String name, String value, String url, PdfContentByte appearance, float llx, float lly, float urx, float ury)
name
- name of the fieldvalue
- value of the fieldurl
- url of the actionappearance
- an object of PdfContentByte
llx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void setButtonParams(PdfFormField button, int characteristics, String name, String value)
button
- an object of PdfFormField
characteristics
- characteristicsname
- name of the fieldvalue
- value of the fieldpublic void drawButton(PdfFormField button, String caption, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
button
- an object of PdfFormField
caption
- captionfont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addHiddenField(String name, String value)
name
- name of the fieldvalue
- value of the fieldpublic PdfFormField addSingleLineTextField(String name, String text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldtext
- value for fieldfont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addMultiLineTextField(String name, String text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldtext
- value for fieldfont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addSingleLinePasswordField(String name, String text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldtext
- text for the fieldfont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void setTextFieldParams(PdfFormField field, String text, String name, float llx, float lly, float urx, float ury)
field
- an object of PdfFormField
text
- text for the fieldname
- name of the fieldllx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void drawSingleLineOfText(PdfFormField field, String text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
field
- fieldtext
- text for the fieldfont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void drawMultiLineOfText(PdfFormField field, String text, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
field
- field, an object of PdfFormField
text
- text for fieldfont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addCheckBox(String name, String value, boolean status, float llx, float lly, float urx, float ury)
name
- field namestatus
- statusvalue
- value of the fieldllx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void setCheckBoxParams(PdfFormField field, String name, String value, boolean status, float llx, float lly, float urx, float ury)
name
- field namestatus
- statusfield
- field, an object of PdfFormField
value
- value of the fieldllx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void drawCheckBoxAppearences(PdfFormField field, String value, float llx, float lly, float urx, float ury)
field
- field, an object of PdfFormField
value
- value of the fieldllx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField getRadioGroup(String name, String defaultValue, boolean noToggleToOff)
name
- name of the fielddefaultValue
- default valuenoToggleToOff
- noToggleToOffpublic void addRadioGroup(PdfFormField radiogroup)
radiogroup
- fieldpublic PdfFormField addRadioButton(PdfFormField radiogroup, String value, float llx, float lly, float urx, float ury)
radiogroup
- radio group fieldvalue
- value of the fieldllx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void drawRadioAppearences(PdfFormField field, String value, float llx, float lly, float urx, float ury)
field
- field, an object of PdfFormField
value
- valuellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addSelectList(String name, String[] options, String defaultValue, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldoptions
- optionsdefaultValue
- default valuefont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addSelectList(String name, String[][] options, String defaultValue, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldoptions
- optionsdefaultValue
- default valuefont
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addComboBox(String name, String[] options, String defaultValue, boolean editable, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldoptions
- optionsdefaultValue
- default valueeditable
- if field is editable, true
or false
font
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addComboBox(String name, String[][] options, String defaultValue, boolean editable, BaseFont font, float fontSize, float llx, float lly, float urx, float ury)
name
- name of the fieldoptions
- optionsdefaultValue
- default valueeditable
- if field is editable, true
or false
font
- an object of BaseFont
fontSize
- font sizellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void setChoiceParams(PdfFormField field, String name, String defaultValue, float llx, float lly, float urx, float ury)
field
- field, an object of PdfFormField
name
- field namedefaultValue
- default caluellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic PdfFormField addSignature(String name, float llx, float lly, float urx, float ury)
name
- field namellx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void setSignatureParams(PdfFormField field, String name, float llx, float lly, float urx, float ury)
name
- field namefield
- field, an object of PdfFormField
llx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-ypublic void drawSignatureAppearences(PdfFormField field, float llx, float lly, float urx, float ury)
field
- field, an object of PdfFormField
llx
- lower-left-xlly
- lower-left-yurx
- upper-right-xury
- upper-right-yCopyright © 2020. All rights reserved.