Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active December 23, 2021 05:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/f39166a7085445fc5a1c5879b4fd3eba to your computer and use it in GitHub Desktop.
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
// 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