Class LoadOptions
Navne til: Aspose.Note Sammensætning: Aspose.Note.dll (25.4.0)
Optioner, der bruges til at oplade et dokument.
public class LoadOptions
{
public bool KeepTextOnly;
public bool KeepTextAndTables;
public bool KeepTableRows;
public bool KeepLastH1;
public bool KeepLastH2;
public bool KeepLastH3;
public bool KeepLastH4;
public bool KeepLastH5;
public bool KeepLastH6;
public bool KeepLastParaGraph;
}
Inheritance
De arvede medlemmer
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Det viser, hvordan man får et krypteret dokument.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
LoadOptions loadOptions = new LoadOptions { DocumentPassword = "password" };
Document doc = new Document(dataDir + "Sample1.one", loadOptions);
Det viser, hvordan man laver en krypteret notebook.
string 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" });
Se, hvordan man får siden historie.
string dataDir = RunExamples.GetDataDir_Pages();
Document document = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });
Page firstPage = document.FirstChild;
foreach (Page pageRevision in document.GetPageHistory(firstPage))
{
Console.WriteLine("LastModifiedTime: {0}", pageRevision.LastModifiedTime);
Console.WriteLine("CreationTime: {0}", pageRevision.CreationTime);
Console.WriteLine("Title: {0}", pageRevision.Title);
Console.WriteLine("Level: {0}", pageRevision.Level);
Console.WriteLine("Author: {0}", pageRevision.Author);
Console.WriteLine();
}
Constructors
Optioner til optagelse ()
public LoadOptions()
{
}
Properties
DocumentPassword
Giver eller indsætter en adgangskode for det krypterede dokumentindhold. værdi ignoreres, hvis dokumentet ikke er password beskyttet.
public string DocumentPassword
{
get;
set;
}
Ejendomsværdi
Examples
Det viser, hvordan man får et krypteret dokument.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
LoadOptions loadOptions = new LoadOptions { DocumentPassword = "password" };
Document doc = new Document(dataDir + "Sample1.one", loadOptions);
Det viser, hvordan man laver en krypteret notebook.
string 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" });
LoadHistory
Giver eller indsætter en værdi, der angiver, om en dokumentlader bør ignorere historien. Brug denne mulighed for at nedsætte hukommelsen og CPU-bruget.Default værdien er ’true'.
public bool LoadHistory
{
get;
set;
}
Ejendomsværdi
Examples
Se, hvordan man får siden historie.
string dataDir = RunExamples.GetDataDir_Pages();
Document document = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });
Page firstPage = document.FirstChild;
foreach (Page pageRevision in document.GetPageHistory(firstPage))
{
Console.WriteLine("LastModifiedTime: {0}", pageRevision.LastModifiedTime);
Console.WriteLine("CreationTime: {0}", pageRevision.CreationTime);
Console.WriteLine("Title: {0}", pageRevision.Title);
Console.WriteLine("Level: {0}", pageRevision.Level);
Console.WriteLine("Author: {0}", pageRevision.Author);
Console.WriteLine();
}