This how-to topic elaborates how to convert .ONE file to PDF in C#. OneNote to PDF conversion in C# is easy using Aspose.Note and doesn’t require you to have Microsoft OneNote installed. The OneNote files converted to PDF are easy to read, review, and share later on in a format which is easy to use on any platform or device.
Steps to Convert .ONE File to PDF in C#
- Install Aspose.Note for .NET package from NuGet.org
- Use Aspose.Note, Aspose.Note.Saving, and Aspose.Note.Saving.Pdf namespaces
- Set license with SetLicense method of Aspose.Note
- Load input Microsoft OneNote (.ONE) file using Document class
- Use SaveFormat.Pdf format option to save .ONE file as PDF
- Save the converted PDF file using Save method of Document object
The above steps clarify how easy and quick it is to convert a OneNote file format to a PDF format using Aspose.Tasks for .NET API.
Code to Convert .ONE File to PDF in C#
This C# code sample shows how you can convert .ONE file to PDF in a few lines of code. You’re not required to install Microsoft OneNote on the computer or server where you want to run this code.