Class LoadOptions
Το όνομα: Aspose.Note Συγκέντρωση: Aspose.Note.dll (25.4.0)
Επιλογές που χρησιμοποιούνται για τη φόρτωση ενός εγγράφου.
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
Κληρονομημένα μέλη
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Examples
Δείχνει πώς να κάνετε ένα κρυπτογραφημένο έγγραφο.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
LoadOptions loadOptions = new LoadOptions { DocumentPassword = "password" };
Document doc = new Document(dataDir + "Sample1.one", loadOptions);
Δείχνει πώς να αποκρυπτογραφήσει ένα σημειωματάριο.
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" });
Δείχνει πώς να πάρετε την ιστορία της σελίδας.
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
Εισαγωγικές επιλογές ()
public LoadOptions()
{
}
Properties
DocumentPassword
Παίρνει ή θέτει έναν κωδικό πρόσβασης για το κρυπτογραφημένο περιεχόμενο του εγγράφου.Η τιμή αγνοείται σε περίπτωση που το έγγραφο δεν προστατεύεται από κωδική πρόσβαση.
public string DocumentPassword
{
get;
set;
}
Αξία ιδιοκτησίας
Examples
Δείχνει πώς να κάνετε ένα κρυπτογραφημένο έγγραφο.
string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
LoadOptions loadOptions = new LoadOptions { DocumentPassword = "password" };
Document doc = new Document(dataDir + "Sample1.one", loadOptions);
Δείχνει πώς να αποκρυπτογραφήσει ένα σημειωματάριο.
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
Αποκτά ή καθορίζει μια τιμή που υποδεικνύει εάν ένα φορτιστή εγγράφων θα πρέπει να αγνοήσει την ιστορία.Χρησιμοποιήστε αυτή την επιλογή για να μειώσετε τη μνήμη και τη χρήση CPU.Η προεπιλεγμένη τιμή είναι “πραγματική”.
public bool LoadHistory
{
get;
set;
}
Αξία ιδιοκτησίας
Examples
Δείχνει πώς να πάρετε την ιστορία της σελίδας.
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();
}