Page coordinates are offset from PDF #1157
-
I am attempting to draw some objects onto a PDF file, however the results are offset from their original positions and shrunk down. For context, the PDF file I am using is 2448x1584 pixels. When drawing the Rect(0,0,2448,1584) (which is the result of page.rect) onto the page, you would expect it to fill the entirety of the page as seen in the left image, but I instead get a result similar to the right image where only one corner of the page is filled. Has anyone experienced this issue before? Would this be an issue with the PDF itself? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Fairly probably, this is caused by a situation handled here. |
Beta Was this translation helpful? Give feedback.
Fairly probably, this is caused by a situation handled here.
Execute
page.clean_contents()
before inserting anything.