For more details, please visit Print OneNote .one NoteBook File using C#
Last active
December 23, 2021 05:43
-
-
Save aspose-com-gists/a7e0cccd09138c14192dbfba211475be to your computer and use it in GitHub Desktop.
Print OneNote .one NoteBook File using C# .NET
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load input OneNote file with the Document constructor. | |
Document document = new Document("Aspose.one"); | |
// Specify custom settings for printing | |
PrinterSettings settings = new PrinterSettings(); | |
settings.PrinterName = "Microsoft Print to PDF"; | |
settings.PrintRange = PrintRange.SomePages; | |
settings.FromPage = 2; | |
settings.ToPage = 4; | |
// Set print options for the OneNote file. | |
PrintOptions options = new PrintOptions(); | |
options.PrinterSettings = settings; | |
// Print the OneNote file | |
document.Print(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Load input OneNote file with the Document constructor. | |
Document document = new Document("Aspose.one"); | |
// Print the OneNote document. | |
document.Print(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment