pymupdf / PyMuPDF

PyMuPDF is a high performance Python library for data extraction, analysis, conversion & manipulation of PDF (and other) documents.
https://pymupdf.readthedocs.io
GNU Affero General Public License v3.0
5.17k stars 495 forks source link

PDF and muPDF coordiantes #3884

Closed anhalu closed 6 days ago

anhalu commented 6 days ago

Description of the bug

I am trying to get the coordinate positions of each text in a pdf file. But the mupdf files have the coordinate origin as top left, but the pdf files have the coordinate origin as bottom left (or may be the random coordinate origin). I only want to get the coordinate origin as top left, is there a way to get the coordinate origin as top left only?

How to reproduce the bug

None.

PyMuPDF version

1.24.10

Operating system

Linux

Python version

3.10

anhalu commented 6 days ago

@JorjMcKie please help me.