C#/.NET Code Samples to Save Microsoft OneNote (.one) file as an image (.PNG, .BMP, .JPEG, .GIF) file


/ Published in: C#
Save to your folder(s)

The Aspose.Note for .NET API allows developers to open files & manipulate elements of OneNote books & export them to PNG, GIF, JPEG, BMP and PDF formats. The following code sample shows developers how to save OneNote File as an image in C#/.NET


Copy this code and paste it in your HTML
  1. The Aspose.Note for .NET API allows developers to open files & manipulate elements of OneNote books & export them to PNG, GIF, JPEG, BMP and PDF formats. The following code sample shows developers how to save OneNote File as an image in C#/.NET
  2.  
  3.  
  4. // Load the document into Aspose.Note.
  5. Document oneFile = new Document(@"FullFileName.one");
  6. // Save the document as GIF.
  7. oneFile.Save("FullFileName.gif", SaveFormat.Gif);
  8.  
  9. OR
  10.  
  11. // Load the document into Aspose.Note.
  12. Document oneFile = new Document(@"FullFileName.one");
  13. // Initialize ImageSaveOptions object
  14. ImageSaveOptions opts = new ImageSaveOptions(SaveFormat.Png);
  15. // Set page index
  16. opts.PageIndex = 1;
  17. // Save the document as PNG.
  18. oneFile.Save(@"FullFileName.png", opts);

URL: http://www.aspose.com/blogs/aspose-blogs/imran.rafique/archive/2014/03/04/read-convert-extract-and-manipulate-the-microsoft-onenote-files-using-aspose.note-for-.net-1.0.0.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.