Aspose.Note.Examples.CSharp.WorkingWithNoteBook.ConvertToImage.Run C# (CSharp) Method

Run() public static method

public static Run ( ) : void
return void
        public static void Run()
        {
            // ExStart:ConvertToImage
            // ExFor:Notebook
            // ExSummary:Shows how to save notebook as image.

            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_NoteBook();

            // Load a OneNote Notebook
            var notebook = new Notebook(dataDir + "Notizbuch öffnen.onetoc2");

            dataDir = dataDir + "ConvertToImage_out.png";

            // Save the Notebook
            notebook.Save(dataDir);

            // ExEnd:ConvertToImage

            Console.WriteLine("\nNoteBook document converted to image successfully.\nFile saved at " + dataDir);
        }
    }
ConvertToImage