1.25.3 regression: Generates bbox with negative values #4320
Replies: 6 comments
-
This is not a bug!
|
Beta Was this translation helpful? Give feedback.
-
@JorjMcKie Thank you for your speedy reply. I updated the issue when I was able to get the code to operate as expected when I changed to version 1.25.2. Does that help? Also, if I'm getting |
Beta Was this translation helpful? Give feedback.
-
Not sure what you mean, but you always need to check for empty bboxes for "blocks", "dict" and "rawdict" variants. These may especially occur when using the |
Beta Was this translation helpful? Give feedback.
-
What is confusing is that the same pdf works with version 1.25.2. Whatever is going on in .3 is preventing my ability to parse the content of the file. The data structure is a tree representation of a document. What I believe is going on is somehow a parent node gets "confused"/generates a negative bbox preventing leaf node formation. Note: lines is empty. This node is a parent node. |
Beta Was this translation helpful? Give feedback.
-
Let's no longer talk past each other: please provide the file you are having issues with and I'll have a look. |
Beta Was this translation helpful? Give feedback.
-
Great! Here are the files. The single page worked, but failed in context of the full pdf. Let me know if you can replicate the issue with these files. I had to decrypt and mask personal information so may have changed things in a way that is relevant to what I'm describing. Thank you! |
Beta Was this translation helpful? Give feedback.
-
Description of the bug
I'm getting bbox value with negative entry values. This seems wrong (and is breaking my logic):
from the following snippet where I'm calling get_text on
pymupdf.Page
:How to reproduce the bug
If I extract a page from the pdf, I can get the parser to work. When I parse all 8 or so pages, I get the negative values.
Finally, if I replace the parser with v1.25.2 I get the expected positive only values.
PyMuPDF version
1.25.3
Operating system
MacOS
Python version
3.11
Beta Was this translation helpful? Give feedback.
All reactions