Skip to content

draw_rect scaled to very small size #3485

@gxlj

Description

@gxlj

Description of the bug

draw_rect behave different on existing page and new page

How to reproduce the bug

i have an existing pdf file and when i use draw_rect to draw on one of its page , eg , (100,100,600,600) , but it scaled to (20,20,200,200) , the rectangle is very small . even i set the width to more like 3000, it only can occupy 1/4 area of the whole page on left-top area .
but when create a new page , and draw on it , it works fine .

my question is , is there some possible reason that make draw_rect such behavior . actually not only draw_rect ,but also insert_text also this behavior . and i compared the new page and existing page , the transformation and other matrix are all same . i think the existing pdf page must have difference with new page , but i can't find it ...

PyMuPDF version

1.24.2

Operating system

MacOS

Python version

3.12

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