ImagePlacement

ImagePlacement

概述

ImagePlacement 是 Aspose.PDF FOSS 中用于 Python 的类。

表示放置在 PDF 页面上的图像。

此类提供 4 种方法,用于在 Python 程序中处理 ImagePlacement 对象。可用的方法包括:__init__、hide、replace、save。安装 Aspose.PDF FOSS for Python 包后,所有公共成员对任何 Python 应用程序均可访问。属性:bits_per_component、color_space、height、image_data、matrix、name,以及另外 5 项。

属性

名称类型访问描述
image_databytes读取返回当前图像负载。
rectangleRectangle读取页面上图像的边界矩形(x、y、宽度、高度,单位为 PDF 点)。
resolutiontuple[float, float]读取图像分辨率为 (horizontal_dpi, vertical_dpi)。
rotationint读取旋转角度(单位为度)(0, 90, 180, 270)。
matrixtuple[float, float, float, float, float, float]读取PDF 变换矩阵 (a, b, c, d, e, f)。
width`intNone`读取
height`intNone`读取
bits_per_component`intNone`读取
color_space`strNone`读取
name``读取获取名称。
page_index``读取获取页面索引。

方法

签名描述
`init(name: str, image_data: bytesbytearray, page_index: int, rect: Rectangle
`replace(new_image_data: bytesbytearray)`
`save(path: stros.PathLike, color_space: str
hide()隐藏图像位置。

另请参阅

 中文