public class FdfWriter
extends java.lang.Object
| Constructor and Description |
|---|
FdfWriter()
Creates a new FdfWriter.
|
| Modifier and Type | Method and Description |
|---|---|
protected Counter |
getCounter() |
java.lang.String |
getField(java.lang.String field)
Gets the field value.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getFields()
Gets all the fields.
|
java.lang.String |
getFile()
Gets the PDF file name associated with the FDF.
|
boolean |
removeField(java.lang.String field)
Removes the field value.
|
boolean |
setFieldAsAction(java.lang.String field,
PdfAction action)
Sets the field value as a
PDFAction. |
boolean |
setFieldAsName(java.lang.String field,
java.lang.String value)
Sets the field value as a name.
|
boolean |
setFieldAsString(java.lang.String field,
java.lang.String value)
Sets the field value as a string.
|
void |
setFields(AcroFields af)
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(java.lang.String file)
Sets the PDF file name associated with the FDF.
|
void |
writeTo(java.io.OutputStream os)
Writes the content to a stream.
|
protected Counter COUNTER
public void writeTo(java.io.OutputStream os)
throws java.io.IOException
os - the streamjava.io.IOException - on errorpublic boolean removeField(java.lang.String field)
field - the field nametrue if the field was found and removed,
false otherwisepublic java.util.HashMap<java.lang.String,java.lang.Object> getFields()
PdfObject.public java.lang.String getField(java.lang.String field)
field - the field namenull if not foundpublic boolean setFieldAsName(java.lang.String field,
java.lang.String value)
field - the fully qualified field namevalue - the valuetrue if the value was inserted,
false if the name is incompatible with
an existing fieldpublic boolean setFieldAsString(java.lang.String field,
java.lang.String value)
field - the fully qualified field namevalue - the valuetrue if the value was inserted,
false if the name is incompatible with
an existing fieldpublic boolean setFieldAsAction(java.lang.String field,
PdfAction action)
PDFAction.
For example, this method allows setting a form submit button action using PdfAction.createSubmitForm(String, Object[], int).
This method creates an A entry for the specified field in the underlying FDF file.
Method contributed by Philippe Laflamme (plaflamme)field - the fully qualified field nameaction - the field's actiontrue if the value was inserted,
false if the name is incompatible with
an existing fieldpublic void setFields(FdfReader fdf)
FdfReaderfdf - the FdfReaderpublic void setFields(PdfReader pdf)
PdfReaderpdf - the PdfReaderpublic void setFields(AcroFields af)
AcroFieldsaf - the AcroFieldspublic java.lang.String getFile()
public void setFile(java.lang.String file)
file - the PDF file name associated with the FDFprotected Counter getCounter()
Copyright © 2013. All Rights Reserved.