Solved

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

Posted on 2013-10-29
1
2,115 Views
Last Modified: 2013-11-04
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
Comment
Question by:wintersun
1 Comment
 
LVL 19

Accepted Solution

by:
mrwad99 earned 400 total points
ID: 39611165
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

PaperPort 14.5 Patch 1 update is often not detected or downloaded automatically. This article provides direct download links to solve the problem for retail (non-bundled) versions of the Standard and Professional editions, as well as the Professiona…
When the confidentiality and security of your data is a must, trust the highly encrypted cloud fax portfolio used by 12 million businesses worldwide, including nearly half of the Fortune 500.
This video is the second in a two-part series that discusses PaperPort's "Send To Bar" feature . The first video tutorial (http://www.experts-exchange.com/VP_207.html) explains the purpose of the Send To Bar, how to use it, and how to hide unwanted …
In this video, we show how to perform Bates Numbering/Stamping of PDF documents using Power PDF Advanced, the newest product from the Document Imaging division of Nuance Communications. There are two editions of Power PDF — Standard and Advanced. Th…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question