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

No text for some pages of a pdf file #154

Open
nmakhotkin opened this issue Sep 24, 2024 · 1 comment
Open

No text for some pages of a pdf file #154

nmakhotkin opened this issue Sep 24, 2024 · 1 comment

Comments

@nmakhotkin
Copy link

nmakhotkin commented Sep 24, 2024

Given this PDF, there is no text output until page 8 yet it can be exported well (without formatting etc.) using directly pymupdf.

68478448.pdf

import pymupdf4llm
import pymupdf

text = pymupdf4llm.to_markdown(
    '68478448.pdf',
    margins=(0, 15, 0, 15),
    write_images=True,
    show_progress=True,
)
pymupdf_text = pymupdf.open('68478448.pdf').get_page_text(0)

print('DÉNOMINATION DU MÉDICAMENT' in text)  # False
print('DÉNOMINATION DU MÉDICAMENT' in pymupdf_text)  # True

text here starts with rare (≥ 1/10 000 à < 1/1 000) which is found only on 8th page in the file.

UPD: It worked ok with version 0.0.16

@inacionery
Copy link

+1

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

No branches or pull requests

2 participants