We help IT Professionals succeed at work.

Add and Update pages to PDF files

ank5
ank5 used Ask the Experts™
on
I want to write a Java utlity which would enable me to add/remove pages to a PDF file. suppose, I have a PDF file, file1 which 40 pages. There is another PDF file called file2 which 3 pages. The Java utlity should be able to take 2nd page of file2 and add it after 31st page in file1. Similarly, I should be able to replace page 25th of file1 with page3 of file2

Is there an API which enables me to do this? Is there some license required for the same?

Thank you
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2016
Commented:
iText is the principal api

http://www.itextpdf.com/
Awarded 2011
Awarded 2011
Commented:
This is an example of how to merge two PDF files with iText

http://java-x.blogspot.com/2006/11/merge-pdf-files-with-itext.html

THis is about iText licensing:
http://www.itextpdf.com/terms-of-use/agpl.php
Mick BarryJava Developer
Top Expert 2010
Commented:
following example show you how to take pages from one pdg and put them in another.
http://www.roseindia.net/java/itext/Comboine2page.shtml