Skip to content

shape different between getText and getPixmap #1143

Answered by JorjMcKie
tangent2018 asked this question in Q&A
Discussion options

You must be logged in to vote

There is an important difference, how page rotation is handled by functions dealing with coordinates of page elements and functions rendering the page to a pixmap:

  • Rendering the page always reflects how the page looks like - as if you would see it using a PDF viewer application.
  • Text searching and extraction, image bbox computation, as well as inserting text, images and other stuff is always based on coordinates of the unrotated page. There are several good reasons for this.

So to synchronize, you need to either rotate the pixmap (prerotate() method) or (temporarily) de-rotate the page before rendering.
You could of course also compute the rotated coordinates of anything provided by tex…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@tangent2018
Comment options

Answer selected by tangent2018
Comment options

You must be logged in to vote
1 reply
@tangent2018
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1142 on July 14, 2021 11:40.