Convert OneNote to PDF using C#
Please note that you cannot set values against the Application and Producer fields, because of Aspose Ltd. and Aspose.Note for .NET x.x will be displayed against these fields.
Time to time it turns out to be useful to share just a piece of gathered notes without providing access to full notes or add notes as a part of another document. One of the best ways to achieve this goal is to save OneNote 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. Software to deal with PDF documents is available almost on all platforms.
Using Microsoft OneNote desktop app you can export your notes to PDF format:
- Select pages you want to export by holding Ctrl + mouse right-click
- Choose File -> Export
- Under ‘Export Current’ choose what to export
- Under ‘Select Format’ choose option for pdf
- Press export and specify destination file name
All selected content will be saved to specified file.
The second option provided by Microsoft OneNote is to install custom pdf printer like CutePDF/PDFCreator. Using this option:
- Select pages you want to export by holding Ctrl + mouse right-click
- Choose File -> Print
- Select your pdf printer
- Press ‘Preferences’ to review and change settings
- Press ‘Print’ and specify destination file.
As you see both options provided by Microsoft OneNote lack of settings to tune saving. Aspose.Note fills this gap and supports export to PDF with a set of useful settings. Using latest version of Aspose.Note you can:
- Specify any range of pages to be saved.
- Specify settings for image compression.
- Handle absent fonts.
- Control how content is splitted to pdf pages.
Aspose.Note for .NET offers the Document class that represents a OneNote document. The Document class exposes the Save method that can be called to convert a OneNote document into a PDF document. The PdfSaveOptions class allows to specify additional settings for saving operation.
Convert OneNote to PDF
Basic samples of how to convert OneNote to PDF Convert of OneNote to PDF with replacing of missing fonts