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