• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2443
  • Last Modified:

How to duplicate a copy of existing PDF document and insert a new page to the beginning of the duplicated PDF document using iText

Dear experts,

I'm new to iText. Anyone can provide a guideline "How to duplicate a copy of existing PDF document and insert a new page to the beginning of the duplicated PDF document using iText?"

For example, which Java classes/methods of iText is able to handle the copy / duplication of the existing PDF document.

Also, the way to insert a new page to the beginning of the duplicated PDF document.

Kindly please advise.
Thanks.
0
wintersun
Asked:
wintersun
1 Solution
 
mrwad99Commented:
OK.  First, you need to use the PdfCopy class.  From the offical documentation: http://api.itextpdf.com/itext/com/itextpdf/text/pdf/PdfCopy.html

You then need to insert a page using the InsertPages class.  See http://itextpdf.com/examples/iia.php?id=120.

I haven't quoted the code here because it is all explained in the tutorial above.

HTH
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now