Create a Hello World OneNote Document using the API
This article explains how to create a OneNote document from scratch using the simple APIs provided by Aspose.Note for Java. To create a OneNote document, add page, outline, outline element and text dynamically using the set of classes packaged in the Aspose.Note namespace.
Please follow these steps to create a OneNote document using the Aspose.Note APIs:
- Create an instance of the Document class that represents a OneNote document.
- If you have purchased a license, then embed the code to apply for that license with the help of the License class.
- Initialize one object of Page, Outline, OutlineElement and RichText classes bypassing the Document class object. Calling the AppendChildLast method of the OutlineElement, Outline, Page and Document classes adds an appropriate new node that can be further used to add new nodes to the OneNote document.
- The TextStyle class defines the text formatting. Similarly, the DefaultStyle property exposed by RichText class allows applying to format on the text.
- Generate the OneNote document by calling the Save method of the Document object.
These articles show how to: