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
1,988 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction This article discusses the Chain of Responsibility pattern, explaining What it is;Why it is; andHow it is At the end of this article, I hope you will be able to describe the use and benefits of Chain of Responsibility.  Backgrou…
Introduction This question got me thinking... (http://www.experts-exchange.com/questions/28707487/GLOBALS.html) Why shouldn't we use Globals? This is a simple question without a simple answer.  How do you explain these concepts to a programmer w…
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…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now