ShapeRenderer

General

ShapeRenderer és una classe en Aspose.Words per a Python.

Renders de formes, imatges i elements posicionats.

Mètodes

SignatureDescription
__init__(writer: LdmPdfWriter)
compress_image_bytes(image_bytes: bytes)bytesApply image_compression and jpeg_quality options to raw image bytes.
render_shape(pdf: FPDF, shape: ldm.ShapeNode)Render a ShapeNode: image first (if any), then text-box paragraphs.
render_image_shape(pdf: FPDF, shape: ldm.ShapeNode)Embed an image from a ShapeNode into the PDF, scaling to fit page width.
render_floating_images(pdf: FPDF, para: ldm.Paragraph)Draw wrapNone images at their anchor coordinates.
render_positioned_shapes(pdf: FPDF, doc: ldm.Document)Draw every absolutely-positioned shape on the current (first) page.
render_positioned_shapes_in(pdf: FPDF, paragraphs: list[ldm.Paragraph], line_y_override: Optional[float])Draw positioned shapes carried by paragraphs without moving cursor.
render_positioned_shape(pdf: FPDF, shape: ldm.ShapeNode, line_y_override: Optional[float])Draw a positioned shape at its absolute page coordinates.
estimate_text_box_height(paragraphs: list[ldm.Paragraph])floatApproximate the laid-out height of a list of paragraphs in mm.
 Català