Class LoadOptions

Class LoadOptions

Tên không gian: Aspose.Note Tổng hợp: Aspose.Note.dll (25.4.0)

Các tùy chọn được sử dụng để tải một tài liệu.

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 LoadOptions

Thành viên thừa kế

object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Examples

Hiển thị cách làm cho một tài liệu mã hóa.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   LoadOptions loadOptions = new LoadOptions { DocumentPassword = "password" };
   Document doc = new Document(dataDir + "Sample1.one", loadOptions);

Hiển thị làm thế nào để một máy tính xách tay mã hóa.

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" });

Hiển thị cách để có được lịch sử của trang.

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

Tính năng LoadOptions()

public LoadOptions()
   {
   }

Properties

DocumentPassword

Nhận hoặc đặt mật khẩu cho nội dung tài liệu được mã hóa. giá trị bị bỏ qua trong trường hợp Tài liệu không được bảo vệ bằng password.

public string DocumentPassword
   {
      get;
      set;
   }

Giá trị bất động sản

string

Examples

Hiển thị cách làm cho một tài liệu mã hóa.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   LoadOptions loadOptions = new LoadOptions { DocumentPassword = "password" };
   Document doc = new Document(dataDir + "Sample1.one", loadOptions);

Hiển thị làm thế nào để một máy tính xách tay mã hóa.

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

Nhận hoặc đặt một giá trị cho thấy liệu một bộ sạc tài liệu nên bỏ qua lịch sử.Hãy sử dụng tùy chọn này để giảm bộ nhớ và CPU usage.Default value is ’true'.

public bool LoadHistory
   {
      get;
      set;
   }

Giá trị bất động sản

bool

Examples

Hiển thị cách để có được lịch sử của trang.

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();
   }
 Tiếng Việt