I want to extract texts from Pdf file using python 3.5.0 with the help of slate package on windows8.
Problem: Although I have installed slate package successfully still when i am trying to import slate there are certain errors.Please suggest what i am missing.
Errors:
Traceback (most recent call last): File "", line 1, in import slate File "C:\Users\name\AppData\Local\Programs\Python\Python35-32\lib\site-packages\slate-0.4.1-py3.5.egg\slate__init__.py", line 66, in from slate import PDF
ImportError: cannot import name 'PDF'
You could try pdftotext
(windows version) from the poppler library.
As a standalone program, it doesn't require Python. But I often use it from Python as a subprocess, like this:
import subprocess
args = ['pdftotext', '-layout', '-q', 'input.pdf', '-']
txt = subprocess.check_output(args, universal_newlines=True)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With