Class NotebookSaveOptions
Namespace: Aspose.Note.Saving
Assembly: Aspose.Note.dll (24.12.0)
An abstract base class which represents notebook saving options for a particular format.
public abstract class NotebookSaveOptions
Inheritance
Derived
NotebookSaveOptions<tdocumentsaveoptions>
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.```csharp // The path to the documents directory. string dataDir = RunExamples.GetDataDir_NoteBook();
// Load a OneNote Notebook
var notebook = new Notebook(dataDir + "Notizbuch �ffnen.onetoc2");
// Save the Notebook
dataDir = dataDir + "ConvertToPDFAsFlattened_out.pdf";
notebook.Save(
dataDir,
new NotebookPdfSaveOptions
{
Flatten = true
});
Shows how to save notebook in pdf format with specified options.```csharp
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_NoteBook();
// Load a OneNote Notebook
var notebook = new Notebook(dataDir + "Notizbuch �ffnen.onetoc2");
var notebookSaveOptions = new NotebookPdfSaveOptions();
var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
documentSaveOptions.PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm();
dataDir = dataDir + "ConvertToPDF_out.pdf";
// Save the Notebook
notebook.Save(dataDir, notebookSaveOptions);
Shows how to save flattened notebook as image.```csharp // The path to the documents directory. string dataDir = RunExamples.GetDataDir_NoteBook();
// Load a OneNote Notebook
var notebook = new Notebook(dataDir + "Notizbuch öffnen.onetoc2");
var notebookSaveOptions = new NotebookImageSaveOptions(SaveFormat.Png);
var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
documentSaveOptions.Resolution = 400;
notebookSaveOptions.Flatten = true;
dataDir = dataDir + "ConvertToImageAsFlattenedNotebook_out.png";
// Save the Notebook
notebook.Save(dataDir, notebookSaveOptions);
## Constructors
### <a id="Aspose_Note_Saving_NotebookSaveOptions__ctor"></a> NotebookSaveOptions\(\)
```csharp
protected NotebookSaveOptions()
Properties
DeferredSaving
Gets or sets a value indicating whether children documents should be saved explicitly.
public bool DeferredSaving { get; set; }
Property Value
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; set; }
Property Value
Examples
Shows how to save flattened notebook in pdf format.```csharp // The path to the documents directory. string dataDir = RunExamples.GetDataDir_NoteBook();
// Load a OneNote Notebook
var notebook = new Notebook(dataDir + "Notizbuch �ffnen.onetoc2");
// Save the Notebook
dataDir = dataDir + "ConvertToPDFAsFlattened_out.pdf";
notebook.Save(
dataDir,
new NotebookPdfSaveOptions
{
Flatten = true
});
Shows how to save flattened notebook as image.```csharp
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_NoteBook();
// Load a OneNote Notebook
var notebook = new Notebook(dataDir + "Notizbuch öffnen.onetoc2");
var notebookSaveOptions = new NotebookImageSaveOptions(SaveFormat.Png);
var documentSaveOptions = notebookSaveOptions.DocumentSaveOptions;
documentSaveOptions.Resolution = 400;
notebookSaveOptions.Flatten = true;
dataDir = dataDir + "ConvertToImageAsFlattenedNotebook_out.png";
// Save the Notebook
notebook.Save(dataDir, notebookSaveOptions);
SaveFormat
Gets the format in which the notebook is saved.
public abstract SaveFormat SaveFormat { get; }
Property Value
Methods
GetDocumentSaveOptions()
Gets the save options for all notebook’s child documents.
public abstract SaveOptions GetDocumentSaveOptions()
Returns
The Aspose.Note.Saving.SaveOptions. </tdocumentsaveoptions>