-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Uhm, I would hazard a guess that these particular images might actually be nested in a Form XObject container (you can basically imagine this like another page nested in the page). Thus, coordinates of sub-objects are relative to the Form XObject itself, not to the main page. As far as I know, upstream pdfium does not have a public API that would allow to translate Form XObject coordinates to the main page coordinates, so you can only work around this issue by setting I've been aware of this problem for a while, as it affects post-processing in pypdfium2's built-in rendering CLI as well: pypdfium2/src/pypdfium2/_cli/render.py Line 307 in f2c3a54 |
Beta Was this translation helpful? Give feedback.
Uhm, I would hazard a guess that these particular images might actually be nested in a Form XObject container (you can basically imagine this like another page nested in the page). Thus, coordinates of sub-objects are relative to the Form XObject itself, not to the main page.
Try highlighting objects of type
FPDF_PAGEOBJ_FORM
to check if that hypothesis is correct.As far as I know, upstream pdfium does not have a public API that would allow to translate Form XObject coordinates to the main page coordinates, so you can only work around this issue by setting
max_depth=1
to exclude images from within Form XObjects altogether.I've been aware of this problem for a while, as it affects post-p…