Class PdfCopyFieldsImp

    • Field Detail

      • iTextTag

        private static final PdfName iTextTag
      • zero

        private static final java.lang.Integer zero
      • readers

        private final java.util.ArrayList readers
      • readers2intrefs

        java.util.HashMap readers2intrefs
      • pages2intrefs

        private final java.util.HashMap pages2intrefs
      • visited

        private final java.util.HashMap visited
      • fields

        java.util.ArrayList fields
      • fieldTree

        private final java.util.HashMap fieldTree
      • pageRefs

        private final java.util.ArrayList pageRefs
      • pageDics

        private final java.util.ArrayList pageDics
      • closing

        private boolean closing
      • tabOrder

        private java.util.HashMap tabOrder
      • calculationOrder

        private final java.util.ArrayList calculationOrder
      • calculationOrderRefs

        private java.util.ArrayList calculationOrderRefs
      • hasSignature

        private boolean hasSignature
      • widgetKeys

        private static final java.util.HashMap widgetKeys
      • fieldKeys

        protected static final java.util.HashMap fieldKeys
    • Method Detail

      • updateCalculationOrder

        protected void updateCalculationOrder​(PdfReader reader)
        Since:
        2.1.5; before 2.1.5 the method was private
      • propagate

        private void propagate​(PdfObject obj,
                               PdfIndirectReference refo,
                               boolean restricted)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • branchForm

        private PdfArray branchForm​(java.util.HashMap level,
                                    PdfIndirectReference parent,
                                    java.lang.String fname)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • createAcroForms

        private void createAcroForms()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • close

        public void close()
        Description copied from class: PdfWriter
        Signals that the Document was closed and that no other Elements will be added.

        The pages-tree is built and written to the outputstream. A Catalog is constructed, as well as an Info-object, the reference table is composed and everything is written to the outputstream embedded in a Trailer.

        Specified by:
        close in interface DocListener
        Overrides:
        close in class PdfWriter
        See Also:
        DocWriter.close()
      • closeIt

        private void closeIt()
                      throws java.io.IOException
        Creates the new PDF by merging the fields and forms.
        Throws:
        java.io.IOException
      • addPageOffsetToField

        private void addPageOffsetToField​(java.util.HashMap fd,
                                          int pageOffset)
      • createWidgets

        private void createWidgets​(java.util.ArrayList list,
                                   AcroFields.Item item)
      • mergeField

        private void mergeField​(java.lang.String name,
                                AcroFields.Item item)
      • mergeWithMaster

        void mergeWithMaster​(java.util.HashMap fd)
      • mergeFields

        void mergeFields()
      • getPageReference

        public PdfIndirectReference getPageReference​(int page)
        Description copied from class: PdfWriter
        Use this method to get a reference to a page existing or not. If the page does not exist yet the reference will be created in advance. If on closing the document, a page number greater than the total number of pages was requested, an exception is thrown.
        Overrides:
        getPageReference in class PdfWriter
        Parameters:
        page - the page number. The first page is 1
        Returns:
        the reference to the page
      • setVisited

        private boolean setVisited​(PRIndirectReference ref)
        Sets a reference to "visited" in the copy process.
        Parameters:
        ref - the reference that needs to be set to "visited"
        Returns:
        true if the reference was set to visited
      • isVisited

        private boolean isVisited​(PRIndirectReference ref)
        Checks if a reference has already been "visited" in the copy process.
        Parameters:
        ref - the reference that needs to be checked
        Returns:
        true if the reference was already visited
      • isPage

        private boolean isPage​(PRIndirectReference ref)
        Checks if a reference refers to a page object.
        Parameters:
        ref - the reference that needs to be checked
        Returns:
        true is the reference refers to a page object.
      • openDoc

        public void openDoc()