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

python: can't open file 'pdf2txt.py': [Errno 2] No such file or directory #12

Open
conango opened this issue Jan 2, 2018 · 5 comments

Comments

@conango
Copy link

conango commented Jan 2, 2018

In chap 05,when running this command to transfer a PDF to txt from my work folder.This error occurs.

python pdf2txt.py -o en-final-table9.txt EN-FINAL\ Table\ 9.pdf

Is it about the path?

@kjam
Copy link
Collaborator

kjam commented Jan 6, 2018

Hi @conango ,

How did you install pdf2txt? Using pip? Did you use a virtual environment?

Thanks!
-kj

@conango
Copy link
Author

conango commented Jan 8, 2018

Hi @kjam ,
I installed pdf2txt using pip in a real Win10 PC,not any virtual environment.

Thanks

@conango
Copy link
Author

conango commented Jan 8, 2018

and here is the screenshot.
qq 20180108090453

@kjam
Copy link
Collaborator

kjam commented Jan 9, 2018

ok, can you search your computer and see if the pdf2txt.py file is located somewhere on your computer? If so, then you can use the full path like D:\path\pdf2txt.py -o en-final-table9.txt (etc)

@stephensamonte
Copy link

I looked at the source code of PDF Miner on GitHub. You can find pdf2txt.py in the tools directory of the source code.

On PDFMiner documentation website the link to the source code can be found:

image

PDF Miner GitHub Source Code

Here is where the pdf2text.py file is
image

Download the file to a known directory, open a terminal, navigate to that directory and run your command:

$ python pdf2txt.py example.pdf

image

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

3 participants