For more details, please visit Convert OneNote .one File to a Word DOCX or DOC Document in Java
Last active
December 23, 2021 05:47
-
-
Save aspose-com-gists/f39166a7085445fc5a1c5879b4fd3eba to your computer and use it in GitHub Desktop.
Convert OneNote .one to Word DOCX or DOC Document with 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
// Initialize an instance of ByteArrayOutputStream class. | |
final ByteArrayOutputStream stream = new ByteArrayOutputStream(); | |
// Load the OneNote .one file using Document class. | |
com.aspose.note.Document oneFile = new com.aspose.note.Document("Aspose.one"); | |
// Export the .one file as PDF | |
oneFile.save(stream, com.aspose.note.SaveFormat.Pdf); | |
// Load the file using Aspose.PDF Document class. | |
com.aspose.pdf.Document file = new com.aspose.pdf.Document(stream.toByteArray()); | |
// Convert the OneNote .one file as Word DOCX document. | |
file.save("SaveOutput.docx" , com.aspose.pdf.SaveFormat.DocX); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment