I get nothing from this PDF. No Text or Table #1124
robbanp
started this conversation in
Ask for help with specific PDFs
Replies: 1 comment
-
It appears that the text in that PDF is rasterized (converted from actual information about the characters to an image version of them). You can test this by opening the PDF in standard PDF-viewing software and attempting to select or copy-paste the text. To resolve the problem, you can try running the PDF through optical character recognition (OCR) software, but be aware that |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm not sure why, if it's the settings or data. I tried with multiple pdfs from the same source.
tst.pdf
import pdfplumber
print(pdfplumber.version)
pdf = pdfplumber.open("../data/tst.pdf")
p0 = pdf.pages[1]
p0.extract_words()
returns []
...
im = p0.to_image(resolution=75)
im
returns
![image](https://private-user-images.githubusercontent.com/2025820/322207022-fd3f59f3-7bf3-4b97-ab80-4863a00e189a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYwMzY3MDEsIm5iZiI6MTcyNjAzNjQwMSwicGF0aCI6Ii8yMDI1ODIwLzMyMjIwNzAyMi1mZDNmNTlmMy03YmYzLTRiOTctYWI4MC00ODYzYTAwZTE4OWEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTFUMDYzMzIxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MjM0NzViYTNhZGI1OTM1MjI5MzNmY2VkM2EwYWE3OTkwNWQ0NzhkNTFhMTkwODg0NjY5MzdlOGU4MzAyYjgzYyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.3FTSFlynE1ZuBLu9IS7fCHQ6DM0idffWA1NAEPN4pYo)
p0.extract_table()
returns
[['', '', '', '', '', '', '', ''],
['', '', '', '', '', '', '', ''],
[None, '', None, None, None, None, None, None],
['', '', '', '', '', '', '', ''],
[None, '', None, None, None, None, None, None],
['', '', None, None, None, None, None, None],
[None, '', None, None, None, None, None, None],
['', '', '', '', '', '', '', ''],
[None, '', None, None, None, None, None, None],
['', '', '', '', '', '', '', ''],
[None, '', None, None, None, None, None, None]]
Beta Was this translation helpful? Give feedback.
All reactions