The source PDF contains a form which I need to make multiple copies of, in the 
destination PDF.

I have adapted code found on Stack Overflow to retrieve the source PDF's first 
page:

PDPage firstPage = (PDPage) 
templatePDDocument.getDocumentCatalog().getAllPages().get(0);
...

and then to import it into the destination PDF:

PDPage clonedPDPage = clonedDocument.importPage(firstPage);
...

The destination PDF now contains several copies of the form.

I now need to fill out the forms with data from a CSV file.

How do I retrieve each page's form field, given that there's no 
PDPage.getAcroForm() function?

Cheers,

Philippe


----- Mail original -----
De: [email protected]
À: [email protected]
Envoyé: Mardi 21 Avril 2015 11:32:27
Objet: Copying PDPages

Hello,

I would like to copy several times the first page of a PDF document to another.

What is the best way to do this?

Many thanks.

Philippe

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to