Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// For complete examples and data files, please go to
String sourceFile = CommonUtilities.sourcePath + fileName;
// Preparing.
String password = "SomePasswordString";
List<Integer> pageNumbersForRotation = new ArrayList<Integer>();
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);
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.