com.lowagie.text.pdf
Class FdfWriter
java.lang.Object
com.lowagie.text.pdf.FdfWriter
public class FdfWriter
extends java.lang.Object
Writes an FDF form.
- Paulo Soares (psoares@consiste.pt)
(package private) static byte[] | HEADER_FDF
|
(package private) HashMap | fields
|
private String | file - The PDF file associated with the FDF.
|
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.
|
(package private) void | iterateFields(HashMap values, HashMap map, String name)
|
boolean | removeField(String field) - Removes the field value.
|
(package private) boolean | setField(String field, PdfObject value)
|
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(AcroFields acro) - Sets all the fields from this
AcroFields
|
void | setFields(FdfReader fdf) - Sets all the fields from this
FdfReader
|
void | setFields(PdfReader pdf) - Sets all the fields from this
PdfReader
|
void | setFile(String file) - Sets the PDF file name associated with the FDF.
|
void | writeTo(OutputStream os) - Writes the content to a stream.
|
HEADER_FDF
(package private) static byte[] HEADER_FDF
fields
(package private) HashMap fields
file
private String file
The PDF file associated with the FDF.
FdfWriter
public FdfWriter()
Creates a new FdfWriter.
getField
public String getField(String field)
Gets the field value.
- the field value or
null
if not found
getFields
public HashMap getFields()
Gets all the fields. The map is keyed by the fully qualified
field name and the values are PdfObject
.
- a map with all the fields
getFile
public String getFile()
Gets the PDF file name associated with the FDF.
- the PDF file name associated with the FDF
iterateFields
(package private) void iterateFields(HashMap values,
HashMap map,
String name)
removeField
public boolean removeField(String field)
Removes the field value.
true
if the field was found and removed,
false
otherwise
setField
(package private) boolean setField(String field,
PdfObject value)
setFieldAsName
public boolean setFieldAsName(String field,
String value)
Sets the field value as a name.
field
- the fully qualified field namevalue
- the value
true
if the value was inserted,
false
if the name is incompatible with
an existing field
setFieldAsString
public boolean setFieldAsString(String field,
String value)
Sets the field value as a string.
field
- the fully qualified field namevalue
- the value
true
if the value was inserted,
false
if the name is incompatible with
an existing field
setFields
public void setFields(AcroFields acro)
Sets all the fields from this AcroFields
setFields
public void setFields(FdfReader fdf)
Sets all the fields from this FdfReader
setFields
public void setFields(PdfReader pdf)
Sets all the fields from this PdfReader
setFile
public void setFile(String file)
Sets the PDF file name associated with the FDF.
file
- the PDF file name associated with the FDF
writeTo
public void writeTo(OutputStream os)
throws DocumentException,
IOException
Writes the content to a stream.