Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.24 breaks XPS-table example #3295

Closed
martin-dreyer-teck opened this issue Mar 22, 2024 · 4 comments
Closed

v1.24 breaks XPS-table example #3295

martin-dreyer-teck opened this issue Mar 22, 2024 · 4 comments

Comments

@martin-dreyer-teck
Copy link

Description of the bug

With v1.23.26 running page.find_tables() with the provided example file XPS-table.pdf returns one table.
With v1.24, doing the same returns ZERO tables.

How to reproduce the bug

pip install PyMuPDF==1.24

import fitz

doc = fitz.open("XPS-table.pdf")
page = doc[0]
tabs = page.find_tables()
print(f"len={len(tabs.tables)}")

output: len=0

PyMuPDF version

1.24.0

Operating system

Linux

Python version

3.10

@julian-smith-artifex-com
Copy link
Collaborator

Could you provide the file XPS-table.pdf?

@JorjMcKie
Copy link
Collaborator

This is not a table-related problem. When taking a closer look it turns out that no text is extracted from the page.
Based on this, of course no table can ever be identified.

@JorjMcKie
Copy link
Collaborator

Closed b/o extended time without response.

@martin-dreyer-teck
Copy link
Author

@JorjMcKie apologies, I missed the messages on this hence the late response. FYI the file XPS-table.pdf is in the pymupdf repo and presented in examples of how to do table extraction.

https://github.com/pymupdf/PyMuPDF-Utilities/tree/master/table-analysis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants