Class FormWriter

java.lang.Object
org.jpedal.io.annotation.FormWriter

public final class FormWriter extends Object
Utility class with static methods to all the writing of forms to a PDF
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    writeForms(byte[] input, File output, FormObject[] formArr)
    Update forms values in a PDF and save to the file specified.
    static void
    writeForms(byte[] input, File output, FormObject[] formArr, byte[] password)
    Update forms values in a PDF and save to the file specified, opening an encrypted input with the given password.
    static void
    writeForms(File input, File output, FormObject[] formArr)
    Update forms values in a PDF and save to the file specified.
    static void
    writeForms(File input, File output, FormObject[] formArr, byte[] password)
    Update forms values in a PDF and save to the file specified, opening an encrypted input with the given password.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • writeForms

      public static void writeForms(File input, File output, FormObject[] formArr) throws IOException
      Update forms values in a PDF and save to the file specified.
      Parameters:
      input - File object representing the PDF containing forms
      output - File object representing where the modified PDF should be saved
      formArr - FormObject array representing the new form values
      Throws:
      IOException - if an I/O error occurs during writing
    • writeForms

      public static void writeForms(File input, File output, FormObject[] formArr, byte[] password) throws IOException
      Update forms values in a PDF and save to the file specified, opening an encrypted input with the given password.
      Parameters:
      input - File object representing the PDF containing forms
      output - File object representing where the modified PDF should be saved
      formArr - FormObject array representing the new form values
      password - password for the input PDF, or null if it does not need one
      Throws:
      IOException - if an I/O error occurs during writing
    • writeForms

      public static void writeForms(byte[] input, File output, FormObject[] formArr) throws IOException
      Update forms values in a PDF and save to the file specified.
      Parameters:
      input - byte[] object representing the PDF containing forms
      output - File object representing where the modified PDF should be saved
      formArr - FormObject array representing the new form values
      Throws:
      IOException - if an I/O error occurs during writing
    • writeForms

      public static void writeForms(byte[] input, File output, FormObject[] formArr, byte[] password) throws IOException
      Update forms values in a PDF and save to the file specified, opening an encrypted input with the given password.
      Parameters:
      input - byte[] object representing the PDF containing forms
      output - File object representing where the modified PDF should be saved
      formArr - FormObject array representing the new form values
      password - password for the input PDF, or null if it does not need one
      Throws:
      IOException - if an I/O error occurs during writing