Class LoadOptions

Class LoadOptions

Název místa: Aspose.Note Shromáždění: Aspose.Note.dll (25.4.0)

Možnosti používané k načtení dokumentu.

public class LoadOptions

Inheritance

object LoadOptions

Dědiční členové

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

Examples

Ukazuje, jak vytvořit šifrovaný dokument.

// The path to the documents directory.
                                              string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

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

Ukazuje, jak vytvořit šifrovaný notebook.

// The path to the documents directory.
                                              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" });

Ukazuje, jak získat historii stránky.

// The path to the documents directory.
                                           string dataDir = RunExamples.GetDataDir_Pages();

                                           // Load OneNote document
                                           Document document = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });

                                           // Get first page
                                           Page firstPage = document.FirstChild;
                                           foreach (Page pageRevision in document.GetPageHistory(firstPage))
                                           {
                                               /*Use pageRevision like a regular page.*/
                                               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

LoadOptions()

public LoadOptions()

Properties

DocumentPassword

Obdržíte nebo nastavíte heslo pro šifrovaný obsah dokumentu. hodnota je ignorována v případě, že dokument není chráněn heslem.

public string DocumentPassword { get; set; }

Hodnota nemovitosti

string

Examples

Ukazuje, jak vytvořit šifrovaný dokument.

// The path to the documents directory.
                                              string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

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

Ukazuje, jak vytvořit šifrovaný notebook.

// The path to the documents directory.
                                              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

Obdrží nebo nastaví hodnotu, která naznačuje, zda dokumentový nabíječ by měl ignorovat historii.Používejte tuto možnost ke snížení paměti a CPU usage.Default hodnota je ‘pravdivá’.

public bool LoadHistory { get; set; }

Hodnota nemovitosti

bool

Examples

Ukazuje, jak získat historii stránky.

// The path to the documents directory.
                                           string dataDir = RunExamples.GetDataDir_Pages();

                                           // Load OneNote document
                                           Document document = new Document(dataDir + "Aspose.one", new LoadOptions { LoadHistory = true });

                                           // Get first page
                                           Page firstPage = document.FirstChild;
                                           foreach (Page pageRevision in document.GetPageHistory(firstPage))
                                           {
                                               /*Use pageRevision like a regular page.*/
                                               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();
                                           }
 Čeština