## PrintOptions class

用于打印文档的选项。

```csharp
public class PrintOptions
```

## 构造函数

| 姓名 | 描述 |
| --- | --- |
| [PrintOptions](printoptions/)() | 默认构造函数。 |

## 特性

| 姓名 | 描述 |
| --- | --- |
| [DocumentName](../../aspose.note.saving/printoptions/documentname/) { get; set; } | 获取或设置打印文档时要显示的文档名称（例如，在打印状态对话框或打印机队列中）。 |
| [PageSplittingAlgorithm](../../aspose.note.saving/printoptions/pagesplittingalgorithm/) { get; set; } | 获取或设置用于页面拆分的算法。 |
| [PrinterSettings](../../aspose.note.saving/printoptions/printersettings/) { get; set; } | 获取或设置打印机设置。 |
| [Resolution](../../aspose.note.saving/printoptions/resolution/) { get; set; } | 获取或设置生成图像的分辨率，以每英寸点数为单位。 |

### 例子

显示如何使用具有指定选项的标准 Windows 对话框将文档发送到打印机。

```csharp
// 文档目录的路径。
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"
               });
```

### 也可以看看

* 命名空间 [Aspose.Note.Saving](../../aspose.note.saving/)
* 部件 [Aspose.Note](../../)


