Describe the bug (mandatory)
After 1.18.5 version, getText("xml") returns -2 for page width and height
To Reproduce (mandatory)
import fitz
doc = fitz.open(pdf_file)
for pg_no in range(doc.pageCount):
page = doc.loadPage(pg_no)
page_text = page.getText("xml")
The first line in the output is
<page id="page0" width="-2" height="-2">
Expected behavior (optional)
In 1.18.5 version, the first line was
<page id="page0" width="770.24" height="1514">
Your configuration (mandatory)
3.8.7 (default, Dec 21 2020, 20:10:35)
[GCC 7.5.0]
linux
PyMuPDF 1.18.8: Python bindings for the MuPDF 1.18.0 library.
Version date: 2021-02-03 19:56:11.
Built for Python 3.8 on linux (64-bit).
- PyMuPDF version, installation method: wheel.