Created
April 25, 2019 15:44
-
-
Save GroupDocsGists/c5d682dc8ba12d4f10cf4f26910d34a0 to your computer and use it in GitHub Desktop.
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
// For complete examples and data files, please go to https://github.com/GroupDocs-Merger/GroupDocs.Merger-for-Java | |
String sourceFile = CommonUtilities.sourcePath + fileName; | |
// Preparing. | |
String password = "SomePasswordString"; | |
List<Integer> pageNumbersForRotation = new ArrayList<Integer>(); | |
pageNumbersForRotation.add(3); | |
pageNumbersForRotation.add(6); | |
RotateOptions pagesOptions = new RotateOptions(FileFormat.Vsdx, password, RotateMode.Rotate180, pageNumbersForRotation ); | |
InputStream documentExample = new FileInputStream(sourceFile); | |
// Main method. | |
DocumentResult result = new DocumentHandler().rotatePages(documentExample, pagesOptions); | |
OutputStream documentStream = result.getStream(); | |
CommonUtilities.saveDocument((ByteArrayOutputStream)documentStream, fileName); | |
System.out.print(result.getFileFormat()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment