Related blog post: Rearranging PDF Pages in Java
Last active
March 11, 2022 11:45
-
-
Save GroupDocsGists/220616580be284b2a2104e490d840470 to your computer and use it in GitHub Desktop.
Rearranging PDF Pages in Java
This file contains 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
// Rearrange pages of PDF documents in Java | |
int pageNumber = 6; | |
int newPageNumber = 1; | |
MoveOptions moveOptions = new MoveOptions(pageNumber, newPageNumber); | |
Merger merger = new Merger("path\document.pdf"); | |
merger.movePage(moveOptions); | |
merger.save("path\rearranged-document.pdf"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment