|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.text.pdf.FdfWriter
public class FdfWriter
Writes an FDF form.
Field Summary | |
---|---|
protected Counter |
COUNTER
|
Constructor Summary | |
---|---|
FdfWriter()
Creates a new FdfWriter. |
Method Summary | |
---|---|
protected Counter |
getCounter()
|
String |
getField(String field)
Gets the field value. |
HashMap<String,Object> |
getFields()
Gets all the fields. |
String |
getFile()
Gets the PDF file name associated with the FDF. |
boolean |
removeField(String field)
Removes the field 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(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(String file)
Sets the PDF file name associated with the FDF. |
void |
writeTo(OutputStream os)
Writes the content to a stream. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Counter COUNTER
Constructor Detail |
---|
public FdfWriter()
Method Detail |
---|
public void writeTo(OutputStream os) throws IOException
os
- the stream
IOException
- on errorpublic boolean removeField(String field)
field
- the field name
true
if the field was found and removed,
false
otherwisepublic HashMap<String,Object> getFields()
PdfObject
.
public String getField(String field)
field
- the field name
null
if not foundpublic boolean setFieldAsName(String field, String value)
field
- the fully qualified field namevalue
- the value
true
if the value was inserted,
false
if the name is incompatible with
an existing fieldpublic boolean setFieldAsString(String field, String value)
field
- the fully qualified field namevalue
- the value
true
if the value was inserted,
false
if the name is incompatible with
an existing fieldpublic boolean setFieldAsAction(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 action
true
if the value was inserted,
false
if the name is incompatible with
an existing fieldpublic void setFields(FdfReader fdf)
FdfReader
fdf
- the FdfReader
public void setFields(PdfReader pdf)
PdfReader
pdf
- the PdfReader
public void setFields(AcroFields af)
AcroFields
af
- the AcroFields
public String getFile()
public void setFile(String file)
file
- the PDF file name associated with the FDFprotected Counter getCounter()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |