Class PdfCopyFieldsImp

    • Field Detail

      • widgetKeys

        protected static final java.util.Map<PdfName,​java.lang.Integer> widgetKeys
      • fieldKeys

        protected static final java.util.Map<PdfName,​java.lang.Integer> fieldKeys
      • iTextTag

        private static final PdfName iTextTag
      • zero

        private static final java.lang.Integer zero
      • readers

        private final java.util.List<PdfReader> readers
      • calculationOrder

        private final java.util.List<java.lang.Object> calculationOrder
      • fieldTree

        java.util.Map<java.lang.String,​java.lang.Object> fieldTree
      • closing

        boolean closing
      • tabOrder

        private java.util.Map<PdfArray,​java.util.List<java.lang.Integer>> tabOrder
      • calculationOrderRefs

        private java.util.List<java.lang.Object> calculationOrderRefs
      • hasSignature

        private boolean hasSignature
    • 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,
                               boolean restricted)
      • branchForm

        protected PdfArray branchForm​(java.util.Map<java.lang.String,​java.lang.Object> level,
                                      PdfIndirectReference parent,
                                      java.lang.String fname)
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • createAcroForms

        protected 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 java.lang.AutoCloseable
        Specified by:
        close in interface DocListener
        Overrides:
        close in class PdfWriter
        See Also:
        DocWriter.close()
      • closeIt

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

        void addPageOffsetToField​(java.util.Map<java.lang.String,​AcroFields.Item> fd,
                                  int pageOffset)
      • createWidgets

        void createWidgets​(java.util.List<java.lang.Object> list,
                           AcroFields.Item item)
      • mergeField

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

        void mergeWithMaster​(java.util.Map<java.lang.String,​AcroFields.Item> 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

        protected 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

        protected 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
      • isVisited

        protected boolean isVisited​(PdfReader reader,
                                    int number)
      • isPage

        protected 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()