Class OneSaveOptions

OneSaveOptions class

允许在将文档保存为 OneNote 格式时指定其他选项。

public sealed class OneSaveOptions : SaveOptions

构造函数

姓名描述
OneSaveOptions()默认构造函数。

特性

姓名描述
DocumentPassword { get; set; }获取或设置用于加密文档内容的密码。
FontsSubsystem { get; set; }获取或设置保存时要使用的字体设置
PageCount { get; set; }获取或设置要保存的页数。默认情况下是MaxValue 这意味着将呈现文档的所有页面。
PageIndex { get; set; }获取或设置要保存的第一页的索引。默认为 0.
SaveFormat { get; }获取文档的保存格式。

例子

显示如何使用加密保存文档。

// 文档目录的路径。
string dataDir = RunExamples.GetDataDir_NoteBook();

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

演示如何使用 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());

也可以看看