How to Convert OneNote File or Specific Page of OneNote Document into Image usin

This Technical tip explains how .NET developers can convert OneNote document or specific page of OneNote document into image inside their .NET applications. 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 an 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.
//your code here...//Converting OneNote to Image using the Default Options // [C# Code Sample] // Load the document into Aspose.Note. Document oneFile = new Document(@"FullFileName.one"); // Save the document as Gif. oneFile.Save("FullFileName.gif", SaveFormat.Gif); //[VB.NET Code Sample] ' Load the document into Aspose.Note. Dim oneFile As New Document("FullFileName.one") ' Save the document as Gif. oneFile.Save("FullFileName.gif", SaveFormat.Gif) //Converting a Specific Page in a OneNote Document to Image // [C# Code Sample] // Load the document into Aspose.Note. Document oneFile = new Document(@"FullFileName.one"); // Initialize ImageSaveOptions object ImageSaveOptions opts = new ImageSaveOptions(SaveFormat.Png); // set page index opts.PageIndex = 1; // Save the document as PNG. oneFile.Save(@"FullFileName.png", opts); //[VB.NET Code Sample] ' Load the document into Aspose.Note. Dim oneFile As New Document("FullFileName.one") ' Initialize ImageSaveOptions object Dim opts As New ImageSaveOptions(SaveFormat.Png) ' set page index opts.PageIndex = 1 ' Save the document as PNG. oneFile.Save("FullFileName.png", opts)

Url: http://www.aspose.com/.net/note-component.aspx

Language: C# | User: Sheraz Khan | Created: Feb 17, 2016 | Tags: Converting OneNote to Image Convert Specific OneNote Page to Image Save OneNote as image Save particular page of OneNote as image .NET OneNote API