Class FdfReader

    • Field Detail

      • fields

        java.util.HashMap fields
      • fileSpec

        java.lang.String fileSpec
    • Constructor Detail

      • FdfReader

        public FdfReader​(java.lang.String filename)
                  throws java.io.IOException
        Reads an FDF form.
        Parameters:
        filename - the file name of the form
        Throws:
        java.io.IOException - on error
      • FdfReader

        public FdfReader​(byte[] pdfIn)
                  throws java.io.IOException
        Reads an FDF form.
        Parameters:
        pdfIn - the byte array with the form
        Throws:
        java.io.IOException - on error
      • FdfReader

        public FdfReader​(java.net.URL url)
                  throws java.io.IOException
        Reads an FDF form.
        Parameters:
        url - the URL of the document
        Throws:
        java.io.IOException - on error
      • FdfReader

        public FdfReader​(java.io.InputStream is)
                  throws java.io.IOException
        Reads an FDF form.
        Parameters:
        is - the InputStream containing the document. The stream is read to the end but is not closed
        Throws:
        java.io.IOException - on error
    • Method Detail

      • readPdf

        protected void readPdf()
                        throws java.io.IOException
        Overrides:
        readPdf in class PdfReader
        Throws:
        java.io.IOException
      • kidNode

        protected void kidNode​(PdfDictionary merged,
                               java.lang.String name)
      • readFileSpecification

        protected void readFileSpecification​(PdfDictionary fdf)
      • readFields

        protected void readFields()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • getFields

        public java.util.HashMap getFields()
        Gets all the fields. The map is keyed by the fully qualified field name and the value is a merged PdfDictionary with the field content.
        Returns:
        all the fields
      • getField

        public PdfDictionary getField​(java.lang.String name)
        Gets the field dictionary.
        Parameters:
        name - the fully qualified field name
        Returns:
        the field dictionary
      • decodeString

        private java.lang.String decodeString​(PdfString vs)
      • getFieldValue

        public java.lang.String getFieldValue​(java.lang.String name)
        Gets the field value or null if the field does not exist or has no value defined.
        Parameters:
        name - the fully qualified field name
        Returns:
        the field value or null
      • getFieldRichValue

        public java.lang.String getFieldRichValue​(java.lang.String name)
      • getFieldMultiValue

        public java.lang.String[] getFieldMultiValue​(java.lang.String name)
      • getFileSpec

        public java.lang.String getFileSpec()
        Gets the PDF file specification contained in the FDF.
        Returns:
        the PDF file specification contained in the FDF