Class NotebookLoadOptions
Namespace: Aspose.Note
Assembly: Aspose.Note.dll (25.6.0)
Options used to load a notebook.
public class NotebookLoadOptions
{
public bool IsReadOnly { get; set; }
public string AuthorName { get; private set; }
}
Inheritance
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Shows how to an encrypted notebook.
var dataDir = RunExamples.GetDataDir_NoteBook();
var notebook = new Notebook(dataDir + "test.onetoc2", new NotebookLoadOptions() { DeferredLoading = true });
notebook.LoadChildDocument(dataDir + "Aspose.one");
notebook.LoadChildDocument(dataDir + "Locked Pass1.one", new LoadOptions() { DocumentPassword = "pass" });
notebook.LoadChildDocument(dataDir + "Locked Pass2.one", new LoadOptions() { DocumentPassword = "pass2" });
Constructors
NotebookLoadOptions()
public NotebookLoadOptions()
{
PageSetup = new PageSetup(); // move opening brace to next line for readability
PageSetup.Margins = new MarginSettings() // add one space after comma for readability
{
Left = 0,
Right = 0,
Top = 0,
Bottom = 0
};
}
Properties
DeferredLoading
Gets or sets a value indicating whether children documentsshould be loaded explicitly later.
public bool DeferredLoading
{
get;
private set;
}
Property Value
Examples
Shows how to an encrypted notebook.
var dataDir = RunExamples.GetDataDir_NoteBook();
var notebook = new Notebook(dataDir + "test.onetoc2", new NotebookLoadOptions() { DeferredLoading = true });
notebook.LoadChildDocument(dataDir + "Aspose.one");
notebook.LoadChildDocument(dataDir + "Locked Pass1.one", new LoadOptions() { DocumentPassword = "pass" });
notebook.LoadChildDocument(dataDir + "Locked Pass2.one", new LoadOptions() { DocumentPassword = "pass2" });
Remarks
Default value is ‘false’, so child documents will be loaded implicitly.Value ’true’ is indicating that user should call Aspose.Note.Notebook.LoadChildDocument(System.String) or Aspose.Note.Notebook.LoadChildNotebook(System.String)for each notebook’s child node after notebook itself is loaded.If value is ’true’, Aspose.Note.NotebookLoadOptions.InstantLoading option will be ignored.If notebook is loading from stream, the value is always ’true’ despite was explicitly set by user to ‘false’.
InstantLoading
Gets or sets a value indicating whether children documentsshould be loaded while the parent document is loading.
public bool InstantLoading
{
get;
private set;
}
Property Value
Remarks
Default value is ‘false’, so child documents will be loaded “lazily”,i.e. their loading should be postponed until a direct access to specific child.Value ’true’ is indicating that their loading should be done immediately.