ShapeRenderer
Overview
ShapeRenderer 是Python的Aspose.Words FOSS中的一个类.
呈现形状,图像和定位元素.
这个类提供了10种方法,用于在Python程序中使用ShapeRenderer 对象. 有的方法包括: __init__, compress_image_bytes, estimate_text_box_height, render_anchored_wrapped_shapes, render_floating_images, render_image_shape, render_positioned_shape, render_positioned_shapes, render_positioned_shapes_in, render_shape. 在安装Python包的Aspose.Words FOSS后,所有公众成员都可以访问任何 Python 应用程序.
Methods
| Signature | Description |
|---|---|
__init__(writer: PDFWriterContext) | |
compress_image_bytes(image_bytes: bytes) → bytes | 将 image_compression 和 jpeg_quality 选项应用到原始图像字节. |
render_shape(pdf: FPDF, shape: ldm.ShapeNode) | 首先提供ShapeNode:图像 (如果有的话),然后是文本框段落. |
render_image_shape(pdf: FPDF, shape: ldm.ShapeNode) | 将一个ShapeNode的图像嵌入到 PDF 中,并进行缩放以适应页面宽度. |
render_floating_images(pdf: FPDF, para: ldm.Paragraph) | Draw wrapNone 在它们的座坐标上. |
render_anchored_wrapped_shapes(pdf: FPDF, para: ldm.Paragraph) | 绘制固的 (非线性) 形状,围绕它们包裹文本. |
render_positioned_shapes(pdf: FPDF, doc: ldm.Document) | 在当前 (第一) 页面上绘制每个绝对位置的形状. |
render_positioned_shapes_in(pdf: FPDF, paragraphs: list[ldm.Paragraph], line_y_override: Optional[float]) | 绘制由: 段落 没有移动指标. |
render_positioned_shape(pdf: FPDF, shape: ldm.ShapeNode, line_y_override: Optional[float], y_override: Optional[float]) | 在绝对页面坐标上绘制一个定位的形状. |
estimate_text_box_height(paragraphs: list[ldm.Paragraph]) → float | 列出段落的高度以毫米为准. |