BmpDevice
概述
BmpDevice 是 Aspose.PDF FOSS 中用于 .NET 的一个类。继承自:ImageDevice。
将 PDF 文档页面渲染为 BMP 图像格式。
此类提供了 18 个用于在 .NET 程序中处理 BmpDevice 对象的方法。可用的方法包括:BmpDevice、GetBitmap、ImageDevice、Process。在安装 Aspose.PDF FOSS for .NET 包后,所有公共成员对任何 .NET 应用程序均可访问。属性:CoordinateType、FormPresentationMode、Height、RenderingOptions、Resolution、Width。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
Resolution | Resolution | 读取 | 输出分辨率(单位:DPI)。 |
RenderingOptions | Aspose.Pdf.RenderingOptions | 读写 | 用于高级控制页面到图像渲染的渲染选项。 |
CoordinateType | PageCoordinateType | 读写 | 哪个页面框驱动渲染图像的范围。 |
Width | int | 读取 | 配置的目标像素宽度(0 = 按分辨率遵循页面的自然尺寸)。 |
Height | int | 读取 | 配置的目标像素高度(0 = 按分辨率遵循页面的自然尺寸)。 |
FormPresentationMode | FormPresentationMode | 读写 | 表单字段的渲染方式(Production vs Editor)。 |
方法
| 签名 | 描述 |
|---|---|
BmpDevice(renderer: IPageRenderer) | 在此 BmpDevice 实例上调用 BmpDevice(renderer)。 |
BmpDevice(renderer: IPageRenderer, resolution: Resolution) | 在此 BmpDevice 实例上调用 BmpDevice(renderer, resolution)。 |
BmpDevice() | |
BmpDevice(resolution: Resolution) | 在此 BmpDevice 实例上调用 BmpDevice(resolution)。 |
BmpDevice(width: int, height: int) | 在此 BmpDevice 实例上调用 BmpDevice(width, height)。 |
BmpDevice(width: int, height: int, resolution: Resolution) | 在此 BmpDevice 实例上调用 BmpDevice(width, height, resolution)。 |
BmpDevice(pageSize: Aspose.Pdf.PageSize) | 在此 BmpDevice 实例上调用 BmpDevice(pageSize)。 |
BmpDevice(pageSize: Aspose.Pdf.PageSize, resolution: Resolution) | 在此 BmpDevice 实例上调用 BmpDevice(pageSize, resolution)。 |
Process(page: Page, output: Stream) | 在此 BmpDevice 实例上调用 Process(page, output)。 |
ImageDevice(resolution: Resolution) | 使用内置的 SoftwarePageRenderer,以分辨率初始化一个新的 ImageDevice。 |
ImageDevice() | 使用默认分辨率和内置的 SoftwarePageRenderer 初始化一个新的 ImageDevice。 |
ImageDevice(width: int, height: int) | 使用内置的 SoftwarePageRenderer 在默认分辨率(150 DPI)下,以显式的输出像素尺寸初始化一个新的 ImageDevice。 |
ImageDevice(width: int, height: int, resolution: Resolution) | 使用内置的 SoftwarePageRenderer,以显式的输出像素尺寸和渲染分辨率初始化一个新的 ImageDevice。 |
ImageDevice(pageSize: Aspose.Pdf.PageSize) | 从一个 PageSize 初始化(单位为点;在默认 150 DPI 下转换为整数像素尺寸)。 |
ImageDevice(pageSize: Aspose.Pdf.PageSize, resolution: Resolution) | 从一个 PageSize 以及渲染分辨率进行初始化。 |
GetBitmap(page: Page) | 将页面渲染为位图。 |
Process(page: Page, outputFileName: string) | 将页面转换为图像文件。 |
Process(page: Page) | 将页面转换为图像字节。 |