Class PrintOptions

Class PrintOptions

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

Options used to print a document.

public class PrintOptions

Inheritance

objectPrintOptions

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 sent document to a printer using standard Windows dialog with specified options.```csharp // The path to the documents directory. string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                                    var document = new Aspose.Note.Document(dataDir + "Aspose.one");

                                                                                                    var printerSettings = new PrinterSettings() { FromPage = 0, ToPage = 10 };
                                                                                                    printerSettings.DefaultPageSettings.Landscape = true;
                                                                                                    printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);

                                                                                                    document.Print(new PrintOptions()
                                                                                                                   {
                                                                                                                       PrinterSettings = printerSettings,
                                                                                                                       Resolution = 1200,
                                                                                                                       PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
                                                                                                                       DocumentName = "Test.one"
                                                                                                                   });

## Constructors

### <a id="Aspose_Note_Saving_PrintOptions__ctor"></a> PrintOptions\(\)

```csharp
public PrintOptions()

Properties

DocumentName

Gets or sets the document name to display (for example, in a print status dialog box or printer queue) while printing the document.

public string DocumentName { get; set; }

Property Value

string

Examples

Shows how to sent document to a printer using standard Windows dialog with specified options.```csharp // The path to the documents directory. string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                                    var document = new Aspose.Note.Document(dataDir + "Aspose.one");

                                                                                                    var printerSettings = new PrinterSettings() { FromPage = 0, ToPage = 10 };
                                                                                                    printerSettings.DefaultPageSettings.Landscape = true;
                                                                                                    printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);

                                                                                                    document.Print(new PrintOptions()
                                                                                                                   {
                                                                                                                       PrinterSettings = printerSettings,
                                                                                                                       Resolution = 1200,
                                                                                                                       PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
                                                                                                                       DocumentName = "Test.one"
                                                                                                                   });

### <a id="Aspose_Note_Saving_PrintOptions_PageSplittingAlgorithm"></a> PageSplittingAlgorithm

Gets or sets algorithm used for page splitting.

```csharp
public PageSplittingAlgorithm PageSplittingAlgorithm { get; set; }

Property Value

PageSplittingAlgorithm

Examples

Shows how to sent document to a printer using standard Windows dialog with specified options.```csharp // The path to the documents directory. string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                                    var document = new Aspose.Note.Document(dataDir + "Aspose.one");

                                                                                                    var printerSettings = new PrinterSettings() { FromPage = 0, ToPage = 10 };
                                                                                                    printerSettings.DefaultPageSettings.Landscape = true;
                                                                                                    printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);

                                                                                                    document.Print(new PrintOptions()
                                                                                                                   {
                                                                                                                       PrinterSettings = printerSettings,
                                                                                                                       Resolution = 1200,
                                                                                                                       PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
                                                                                                                       DocumentName = "Test.one"
                                                                                                                   });

### <a id="Aspose_Note_Saving_PrintOptions_PrinterSettings"></a> PrinterSettings

Gets or sets the printer settings.

```csharp
public PrinterSettings PrinterSettings { get; set; }

Property Value

PrinterSettings

Examples

Shows how to sent document to a printer using standard Windows dialog with specified options.```csharp // The path to the documents directory. string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                                    var document = new Aspose.Note.Document(dataDir + "Aspose.one");

                                                                                                    var printerSettings = new PrinterSettings() { FromPage = 0, ToPage = 10 };
                                                                                                    printerSettings.DefaultPageSettings.Landscape = true;
                                                                                                    printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);

                                                                                                    document.Print(new PrintOptions()
                                                                                                                   {
                                                                                                                       PrinterSettings = printerSettings,
                                                                                                                       Resolution = 1200,
                                                                                                                       PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
                                                                                                                       DocumentName = "Test.one"
                                                                                                                   });

### <a id="Aspose_Note_Saving_PrintOptions_Resolution"></a> Resolution

Gets or sets the resolution for the generated images, in dots per inch.

```csharp
public float Resolution { get; set; }

Property Value

float

Examples

Shows how to sent document to a printer using standard Windows dialog with specified options.```csharp // The path to the documents directory. string dataDir = RunExamples.GetDataDir_LoadingAndSaving();

                                                                                                    var document = new Aspose.Note.Document(dataDir + "Aspose.one");

                                                                                                    var printerSettings = new PrinterSettings() { FromPage = 0, ToPage = 10 };
                                                                                                    printerSettings.DefaultPageSettings.Landscape = true;
                                                                                                    printerSettings.DefaultPageSettings.Margins = new System.Drawing.Printing.Margins(50, 50, 150, 50);

                                                                                                    document.Print(new PrintOptions()
                                                                                                                   {
                                                                                                                       PrinterSettings = printerSettings,
                                                                                                                       Resolution = 1200,
                                                                                                                       PageSplittingAlgorithm = new KeepSolidObjectsAlgorithm(),
                                                                                                                       DocumentName = "Test.one"
                                                                                                                   });

#### Remarks

The default value is 96.