Class FdfWriter
java.lang.Object
com.gitlab.pdftk_java.com.lowagie.text.pdf.FdfWriter
Writes an FDF form.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the field value.Gets all the fields.getFile()Gets the PDF file name associated with the FDF.(package private) voiditerateFields(HashMap values, HashMap map, String name) booleanremoveField(String field) Removes the field value.(package private) booleanbooleansetFieldAsName(String field, String value) Sets the field value as a name.booleansetFieldAsString(String field, String value) Sets the field value as a string.voidsetFields(AcroFields af) Sets all the fields from thisAcroFieldsvoidSets all the fields from thisFdfReadervoidSets all the fields from thisPdfReadervoidSets the PDF file name associated with the FDF.voidwriteTo(OutputStream os) Writes the content to a stream.
-
Field Details
-
HEADER_FDF
static byte[] HEADER_FDF -
fields
HashMap fields -
file
The PDF file associated with the FDF.
-
-
Constructor Details
-
FdfWriter
public FdfWriter()Creates a new FdfWriter.
-
-
Method Details
-
writeTo
Writes the content to a stream.- Parameters:
os- the stream- Throws:
DocumentException- on errorIOException- on error
-
setField
-
iterateFields
-
removeField
Removes the field value.- Parameters:
field- the field name- Returns:
trueif the field was found and removed,falseotherwise
-
getFields
Gets all the fields. The map is keyed by the fully qualified field name and the values arePdfObject.- Returns:
- a map with all the fields
-
getField
-
setFieldAsName
-
setFieldAsString
-
setFields
Sets all the fields from thisFdfReader- Parameters:
fdf- theFdfReader
-
setFields
Sets all the fields from thisPdfReader- Parameters:
pdf- thePdfReader
-
setFields
Sets all the fields from thisAcroFields- Parameters:
af- theAcroFields
-
getFile
Gets the PDF file name associated with the FDF.- Returns:
- the PDF file name associated with the FDF
-
setFile
Sets the PDF file name associated with the FDF.- Parameters:
file- the PDF file name associated with the FDF
-