Inserted image becomes small, misplaced and flipped for certain PDF files #3222
-
Hello! I have code which place an image and a text box in the top corners on first page of a PDF file. For certain files the image and text box are placed filpped and very small in the top left corner on the page, as if the coordinate system on those pages where different and the page much larger. But I use page.rect values to place my objects and can't find any difference in page.rect and page.*box between working and not working PDF files. Any hits what I can have missed? /Peter |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
More often than not, these effects are cause by non-isolated changes of the coordinate system. |
Beta Was this translation helpful? Give feedback.
More often than not, these effects are cause by non-isolated changes of the coordinate system.
To be sure, do
page.clean_contents()
before inserting anything into the page.