com.lowagie.text.pdf
public class FdfWriter extends Object
Nested Class Summary | |
---|---|
static class | FdfWriter.Wrt |
Field Summary | |
---|---|
HashMap | fields |
String | file The PDF file associated with the FDF. |
static byte[] | HEADER_FDF |
Constructor Summary | |
---|---|
FdfWriter() Creates a new FdfWriter. |
Method Summary | |
---|---|
String | getField(String field) Gets the field value. |
HashMap | getFields() Gets all the fields. |
String | getFile() Gets the PDF file name associated with the FDF. |
void | iterateFields(HashMap values, HashMap map, String name) |
boolean | removeField(String field) Removes the field value. |
boolean | setField(String field, PdfObject value) |
boolean | setFieldAsAction(String field, PdfAction action)
Sets the field value as a PDFAction .
|
boolean | setFieldAsName(String field, String value) Sets the field value as a name. |
boolean | setFieldAsString(String field, String value) Sets the field value as a string. |
void | setFields(FdfReader fdf) Sets all the fields from this FdfReader |
void | setFields(PdfReader pdf) Sets all the fields from this PdfReader |
void | setFields(AcroFields af) Sets all the fields from this AcroFields |
void | setFile(String file) Sets the PDF file name associated with the FDF. |
void | writeTo(OutputStream os) Writes the content to a stream. |
Parameters: field the field name
Returns: the field value or null
if not found
PdfObject
.Returns: a map with all the fields
Returns: the PDF file name associated with the FDF
Parameters: field the field name
Returns: true
if the field was found and removed,
false
otherwise
PDFAction
.
For example, this method allows setting a form submit button action using (String, Object[], int)
.
This method creates an A
entry for the specified field in the underlying FDF file.
Method contributed by Philippe Laflamme (plaflamme)Parameters: field the fully qualified field name action the field's action
Returns: true
if the value was inserted,
false
if the name is incompatible with
an existing field
Since: 2.1.5
Parameters: field the fully qualified field name value the value
Returns: true
if the value was inserted,
false
if the name is incompatible with
an existing field
Parameters: field the fully qualified field name value the value
Returns: true
if the value was inserted,
false
if the name is incompatible with
an existing field
FdfReader
Parameters: fdf the FdfReader
PdfReader
Parameters: pdf the PdfReader
AcroFields
Parameters: af the AcroFields
Parameters: file the PDF file name associated with the FDF
Parameters: os the stream
Throws: IOException on error