Learn how to Convert OneNote to JPG in Java
Created
June 17, 2025 12:17
-
-
Save aspose-com-gists/b3891d494c0132bdbcc6f88ff6a285c9 to your computer and use it in GitHub Desktop.
Convert OneNote to JPG in Java
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
// Load a OneNote Notebook | |
Document doc = new Document("Sample1.one"); | |
// Save the Notebook | |
doc.save("Sample1_out.jpg", SaveFormat.Jpeg); |
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
// Load the OneNote file | |
Document oneFile = new Document("sample.one"); | |
// Set save options | |
ImageSaveOptions options = new ImageSaveOptions(SaveFormat.Jpeg); | |
options.setPageIndex(0); | |
options.setPageCount(1); | |
options.setResolution(150); | |
// Save with options | |
oneFile.save("output_custom.jpg", options); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment