Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.lowagie.text.pdf
Class FdfWriter

    java.lang.Object
      com.lowagie.text.pdf.FdfWriter

    public class FdfWriter

extends Object

Writes an FDF form.

Author:
  Paulo Soares (psoares@consiste.pt)

Nested Class Summary
`(package private) static class` | `FdfWriter.Wrt`

Field Summary
`(package private) HashMap` | `fields`
`private String` | `file` The PDF file associated with the FDF.
`private 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.
`(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 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

### HEADER_FDF

    private static final byte[] HEADER_FDF

### fields

    HashMap fields

### file

    private String file

  The PDF file associated with the FDF.

Constructor Detail

### FdfWriter

    public FdfWriter()

  Creates a new FdfWriter.

Method Detail

### writeTo

    public void writeTo(OutputStream os)
                 throws IOException

  Writes the content to a stream.

  Parameters:
    `os` - the stream
  Throws:
    `IOException` - on error

### setField

    boolean setField(String field,
                     PdfObject value)

### iterateFields

    void iterateFields(HashMap values,
                       HashMap map,
                       String name)

### removeField

    public boolean removeField(String field)

  Removes the field value.

  Parameters:
    `field` - the field name
  Returns:
    `true` if the field was found and removed, `false` otherwise

### getFields

    public HashMap getFields()

  Gets all the fields. The map is keyed by the fully qualified field name and the values are `PdfObject`.

  Returns:
    a map with all the fields

### getField

    public String getField(String field)

  Gets the field value.

  Parameters:
    `field` - the field name
  Returns:
    the field value or `null` if not found

### setFieldAsName

    public boolean setFieldAsName(String field,
                                  String value)

  Sets the field value as a name.

  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

### setFieldAsString

    public boolean setFieldAsString(String field,
                                    String value)

  Sets the field value as a string.

  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

### setFields

    public void setFields(FdfReader fdf)

  Sets all the fields from this `FdfReader`

  Parameters:
    `fdf` - the `FdfReader`

### setFields

    public void setFields(PdfReader pdf)

  Sets all the fields from this `PdfReader`

  Parameters:
    `pdf` - the `PdfReader`

### setFields

    public void setFields(AcroFields af)

  Sets all the fields from this `AcroFields`

  Parameters:
    `af` - the `AcroFields`

### getFile

    public String getFile()

  Gets the PDF file name associated with the FDF.

  Returns:
    the PDF file name associated with the FDF

### setFile

    public void setFile(String file)

  Sets the PDF file name associated with the FDF.

  Parameters:
    `file` - the PDF file name associated with the FDF

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD