Class ImportFDF


  • public class ImportFDF
    extends java.lang.Object
    This example will take a PDF document and fill the fields with data from the FDF fields.
    • Constructor Summary

      Constructors 
      Constructor Description
      ImportFDF()
      Creates a new instance of ImportFDF.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close​(FDFDocument doc)
      Close the document.
      void close​(PDDocument doc)
      Close the document.
      private void importFDF​(java.lang.String[] args)  
      void importFDF​(PDDocument pdfDocument, FDFDocument fdfDocument)
      This will takes the values from the fdf document and import them into the PDF document.
      static void main​(java.lang.String[] args)
      This will import an fdf document and write out another pdf.
      private static void usage()
      This will print out a message telling how to use this example.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImportFDF

        public ImportFDF()
        Creates a new instance of ImportFDF.
    • Method Detail

      • importFDF

        public void importFDF​(PDDocument pdfDocument,
                              FDFDocument fdfDocument)
                       throws java.io.IOException
        This will takes the values from the fdf document and import them into the PDF document.
        Parameters:
        pdfDocument - The document to put the fdf data into.
        fdfDocument - The FDF document to get the data from.
        Throws:
        java.io.IOException - If there is an error setting the data in the field.
      • main

        public static void main​(java.lang.String[] args)
                         throws java.io.IOException
        This will import an fdf document and write out another pdf.
        see usage() for commandline
        Parameters:
        args - command line arguments
        Throws:
        java.io.IOException - If there is an error importing the FDF document.
      • importFDF

        private void importFDF​(java.lang.String[] args)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • usage

        private static void usage()
        This will print out a message telling how to use this example.
      • close

        public void close​(FDFDocument doc)
                   throws java.io.IOException
        Close the document.
        Parameters:
        doc - The doc to close.
        Throws:
        java.io.IOException - If there is an error closing the document.
      • close

        public void close​(PDDocument doc)
                   throws java.io.IOException
        Close the document.
        Parameters:
        doc - The doc to close.
        Throws:
        java.io.IOException - If there is an error closing the document.