Class NotebookSaveOptions

Class NotebookSaveOptions

Namespace: Aspose.Note.Saving
Assembly: Aspose.Note.dll (25.6.0)

An abstract base class which represents notebook saving options for a particular format.

public abstract class NotebookSaveOptions
{
    public string OutputFilePath { get; set; }
}

Inheritance

object NotebookSaveOptions

Derived

NotebookSaveOptions

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 save flattened notebook in pdf format.

var dataDir = RunExamples.GetDataDir_NoteBook();
   var notebook = new Notebook(dataDir + "Notizbuch Öffnen.onetoc2");
   dataDir += "ConvertToPDFAsFlattened_out.pdf";
   notebook.Save(
      dataDir,
      new NotebookPdfSaveOptions
      {
         Flatten = true
      });

Shows how to save notebook in pdf format with specified options.

string dataDir = RunExamples.GetDataDir_NoteBook();
    var notebook = new Notebook(dataDir + "Notizbuch Öffnen.onetoc2");
    var notebookSaveOptions = new NotebookPdfSaveOptions();
    var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
    documentSaveOptions.PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm();
    dataDir += "ConvertToPDF_out.pdf";
    notebook.Save(dataDir, notebookSaveOptions);

Shows how to save flattened notebook as image.

var dataDir = RunExamples.GetDataDir_NoteBook();
      var notebook = new Notebook(dataDir + "Notizbuch öffnen.onetoc2");
      var notebookSaveOptions = new NotebookImageSaveOptions(SaveFormat.Png)
      {
         DocumentSaveOptions = new DocumentSaveOptions()
         {
            Resolution = 400
         }
      };
      notebookSaveOptions.Flatten = true;
      dataDir += "ConvertToImageAsFlattenedNotebook_out.png";
      notebook.Save(dataDir, notebookSaveOptions);

Constructors

NotebookSaveOptions()

protected void NotebookSaveOptions()
   {
   }

Properties

DeferredSaving

Gets or sets a value indicating whether children documentsshould be saved explicitly.

public bool DeferredSaving
    {
        get;
        private set;
    }

Property Value

bool

Remarks

Default value is ‘false’, so child documents will be saved implicitly.Value ’true’ is indicating that user should save each notebook’s child node explicitly.If notebook is saving to stream, the value is always ’true’ despite was explicitly set by user to ‘false’.

Flatten

Gets or sets a value indicating whether the notebook children hierarchy is saved flattened.

public bool Flatten
{
    get;
    private set;
}

Property Value

bool

Examples

Shows how to save flattened notebook in pdf format.

string dataDir = RunExamples.GetDataDir_NoteBook();
   var notebook = new Notebook(dataDir + "Notizbuch Öffnen.onetoc2");
   dataDir += @"\ConvertToPDFAsFlattened_out.pdf";
   notebook.Save(
       dataDir,
       new NotebookPdfSaveOptions
       {
           Flatten = true
       });

Shows how to save flattened notebook as image.

var dataDir = RunExamples.GetDataDir_NoteBook();
   var notebook = new Notebook(dataDir + "Notizbuch öffnen.onetoc2");
   var notebookSaveOptions = new NotebookImageSaveOptions(SaveFormat.Png)
   {
      DocumentSaveOptions = new DocumentSaveOptions()
      {
         Resolution = 400,
         Flatten = true
      }
   };
   dataDir += "ConvertToImageAsFlattenedNotebook_out.png";
   notebook.Save(dataDir, notebookSaveOptions);

SaveFormat

Gets the format in which the notebook is saved.

public abstract class MyClass
{
    public abstract SaveFormat GetSaveFormat();
}

Property Value

SaveFormat

Methods

GetDocumentSaveOptions()

Gets the save options for all notebook’s child documents.

public abstract SaveOptions GetDocumentSaveOptions()
   {
       return new SaveOptions();
   }

Returns

SaveOptions

The Aspose.Note.Saving.SaveOptions.

 English