Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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
You can’t perform that action at this time.