iText 8.0.5 API
iText.Forms.PdfPageFormCopier Class Reference

A sample implementation of the {#link IPdfPageExtraCopier} interface which copies only AcroForm fields to a new page. More...

Inheritance diagram for iText.Forms.PdfPageFormCopier:
iText.Kernel.Pdf.IPdfPageFormCopier iText.Kernel.Pdf.IPdfPageExtraCopier

Public Member Functions

virtual void  Copy (PdfPage fromPage, PdfPage toPage)
  Copies a page. More...
 
virtual void  RecreateAcroformToProcessCopiedFields (PdfDocument documentTo)
  Create Acroform from its PDF object to process form field objects added to the Acroform during copying. More...
 

Detailed Description

A sample implementation of the {#link IPdfPageExtraCopier} interface which copies only AcroForm fields to a new page.

A sample implementation of the {#link IPdfPageExtraCopier} interface which copies only AcroForm fields to a new page.

NOTE: While it's absolutely not necessary to use the same PdfPageFormCopier instance for copying operations, it is still worth to know that PdfPageFormCopier uses some caching logic which can potentially improve performance in case of the reusing of the same instance.

Member Function Documentation

◆ Copy()

virtual void iText.Forms.PdfPageFormCopier.Copy ( PdfPage  fromPage,
PdfPage  toPage 
)
inlinevirtual

Copies a page.

Copies a page. The new page must already be created before calling this, either in a new PdfDocument or in the same PdfDocument as the old page.

Parameters
fromPage the source page
toPage the target page in a target document

Implements iText.Kernel.Pdf.IPdfPageExtraCopier.

◆ RecreateAcroformToProcessCopiedFields()

virtual void iText.Forms.PdfPageFormCopier.RecreateAcroformToProcessCopiedFields ( PdfDocument  documentTo )
inlinevirtual

Create Acroform from its PDF object to process form field objects added to the Acroform during copying.

Create Acroform from its PDF object to process form field objects added to the Acroform during copying.

All pages must already be copied to the target document before calling this. So fields with the same names will be merged and target document tag structure will be correct.

Parameters
documentTo the target document.

Implements iText.Kernel.Pdf.IPdfPageFormCopier.