Class OneSaveOptions

OneSaveOptions class

Allows to specify additional options when saving document to OneNote format.

public sealed class OneSaveOptions : SaveOptions

Constructors

NameDescription
OneSaveOptions()The default constructor.

Properties

NameDescription
DocumentPassword { get; set; }Gets or sets a password to encrypt the document content.
FontsSubsystem { get; set; }Gets or sets font’s settings to be used while saving
PageCount { get; set; }Gets or sets the number of pages to save. By default is MaxValue which means all pages of the document will be rendered.
PageIndex { get; set; }Gets or sets the index of the first page to save. By default is 0.
SaveFormat { get; }Gets the format in which the document is saved.

Examples

Shows how to save document with encryption.

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

Document document = new Document();
document.Save(dataDir + "CreatingPasswordProtectedDoc_out.one", new OneSaveOptions() { DocumentPassword = "pass" });

Shows how to save a document using OneSaveOptions.

string inputFile = "Sample1.one";
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
string outputFile = "SaveDocToOneNoteFormatUsingOneSaveOptions_out.one";

Document document = new Document(dataDir + inputFile);

document.Save(dataDir + outputFile, new OneSaveOptions());

See Also