Created
November 28, 2013 09:42
-
-
Save thomasjungblut/7689460 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String pathBase = "/home/thomasjungblut/Downloads/"; | |
PDDocument source = PDDocument.load(pathBase | |
+ "c1.pdf"); | |
PDDocument lastPage = PDDocument.load(pathBase + "updated.pdf"); | |
source.removePage(source.getNumberOfPages() - 1); | |
source.addPage( (PDPage) lastPage.getDocumentCatalog().getAllPages().get(0) ); | |
source.save(pathBase + "c2_updated.pdf"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment