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,186 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How do I customize my Standard Colors in PowerPoint 2010? 6 71
MS Word Mail Merge Tempate 6 81
Best process to document customer network information 1 95
Fix45 challenge 15 160
This article provides the solution to a question (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28674207.html) posed here at Experts Exchange. The asker of the question has many JPG images in many folders, and all of t…
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 first in a two-part series that discusses PaperPort's "Send To Bar" feature . This first video tutorial explains the purpose of the Send To Bar, how to use it, and how to hide unwanted items that are automatically created on it whe…
This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…

734 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