Skip to content

Setting alignment of picture in bounding box when using keep_aspect_ratio #1702

@slkoo-cc

Description

@slkoo-cc

Is it possible to choose where to align pdf.image when using w, h, and keep_aspect_ratio? Currently it seems to be stuck to the top left corner.
Example:

pdf.image(
    "./assets/logo.png",
    x=pdf.w - pdf.r_margin - 100,
    y=10,
    w=100,
    h=50,
    keep_aspect_ratio=True,
)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions