Convert OneNote Documents to PDF and Other Formats

Converting OneNote Document to PDF

PDF documents are widely used as a standard format of exchanging documents between organizations, government sectors, and individuals. It’s a popular format so developers are often asked to convert Microsoft OneNote documents to PDF documents. For this purpose, Aspose.Note for .NET supports converting OneNote to PDF documents without using any other component. This topic illustrates how this conversion can be done.

Aspose.Note for .NET offers the Document class that represents a OneNote file. The Document class exposes the Save method that can be called to convert a OneNote document into a PDF document. The PdfSaveOptions class provides options for creating the PDF such as PageIndex, PageCount and others.

Converting OneNote to PDF using the Default Options

The following code example demonstrates how to convert a OneNote into a PDF document using the default options. The default options create a PDF document of the maximum quality.

Converting a Specified Page Range of OneNote to PDF

The following code example demonstrates how to convert a OneNote into a PDF document with a specified page range as provided by the PdfSaveOptions class. It sets the PageIndex and PageCount properties.

Converting a OneNote Document to Image

Aspose.Note supports converting OneNote file to images. To use this feature, import the Aspose.Note.Saving namespace into your application project. It has numerous valuable classes for rendering, for example ImageSaveOptions, PdfSaveOptions and SaveOptions.

Aspose.Note for .NET offers the Document class that represents a OneNote file. The Document class exposes the Save method that can be called to convert the OneNote file into an image format. The ImageSaveOptions class provides options for creating PNG, GIF, JPEG or BMP files, such as PageIndex, SaveFormat and others.

Converting OneNote to Image using the Default Options

The following code example demonstrates how to convert a OneNote into an image using the default options.

Converting a Specific Page in a OneNote to Image

The following code example demonstrates how to convert a specific page in a OneNote file into an image using the ImageSaveOptions class. It sets the PageIndex properties.

Set Output Image Resolution

Set Output Image Quality

The image quality can be set from 0 to 100. Zero indicates the lowest quality and 100 gives the highest quality for the image. The default quality value is 90.