Class PDFFormGenerator


  • public class PDFFormGenerator
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFieldMap​(java.util.Map<java.lang.String,​java.lang.Object> map)  
      void addFieldValue​(java.lang.String field, java.lang.Object value)  
      void generatePDF​(java.io.OutputStream out)  
      void generatePDF​(java.io.OutputStream out, boolean flatten)  
      org.apache.pdfbox.pdmodel.interactive.form.PDField getFieldByAlternateName​(java.lang.String name)  
      org.apache.pdfbox.pdmodel.interactive.form.PDField getFieldById​(java.lang.String id)  
      java.util.Map<java.lang.String,​java.lang.Object> getFieldMap()  
      PDFieldTree getFieldTree()  
      protected org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm getPdAcroForm()  
      protected org.apache.pdfbox.pdmodel.PDDocumentCatalog getPdCatalog()  
      protected org.apache.pdfbox.pdmodel.PDDocument getPdDoc()  
      java.util.List<org.apache.pdfbox.pdmodel.interactive.form.PDField> getTopFields()  
      static void main​(java.lang.String[] args)  
      • Methods inherited from class java.lang.Object

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

      • PDFFormGenerator

        public PDFFormGenerator​(java.io.File file)
                         throws org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException,
                                java.io.IOException
        Throws:
        org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException
        java.io.IOException
      • PDFFormGenerator

        public PDFFormGenerator​(java.io.InputStream inputStream)
                         throws org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException,
                                java.io.IOException
        Throws:
        org.apache.pdfbox.pdmodel.encryption.InvalidPasswordException
        java.io.IOException
    • Method Detail

      • getPdDoc

        protected org.apache.pdfbox.pdmodel.PDDocument getPdDoc()
      • getPdCatalog

        protected org.apache.pdfbox.pdmodel.PDDocumentCatalog getPdCatalog()
      • getPdAcroForm

        protected org.apache.pdfbox.pdmodel.interactive.form.PDAcroForm getPdAcroForm()
      • getFieldMap

        public java.util.Map<java.lang.String,​java.lang.Object> getFieldMap()
      • addFieldValue

        public void addFieldValue​(java.lang.String field,
                                  java.lang.Object value)
      • addFieldMap

        public void addFieldMap​(java.util.Map<java.lang.String,​java.lang.Object> map)
      • getTopFields

        public java.util.List<org.apache.pdfbox.pdmodel.interactive.form.PDField> getTopFields()
      • getFieldTree

        public PDFieldTree getFieldTree()
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • getFieldById

        public org.apache.pdfbox.pdmodel.interactive.form.PDField getFieldById​(java.lang.String id)
                                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • getFieldByAlternateName

        public org.apache.pdfbox.pdmodel.interactive.form.PDField getFieldByAlternateName​(java.lang.String name)
                                                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • generatePDF

        public void generatePDF​(java.io.OutputStream out)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • generatePDF

        public void generatePDF​(java.io.OutputStream out,
                                boolean flatten)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • main

        public static void main​(java.lang.String[] args)