JoshData / pdf-diff

A PDF comparison utility in Python.
Creative Commons Zero v1.0 Universal
446 stars 64 forks source link

FileNotFoundError running diff command #30

Open razorteez18 opened 6 years ago

razorteez18 commented 6 years ago

placed my 2 PDFs in the same folder where pdf-diff application files are. When I run following command in C prompt: pdf-diff before.pdf after.pdf > comparison_output.png I receive 'WinError' saying file not found: image

razorteez18 commented 6 years ago

Here is what my folder looks like: image

connor016 commented 6 years ago

Have you found a solution to this yet? I am having the same issue.

Tananndart commented 5 years ago

This problem manifests itself in Windows.

Solution:

  1. Open pdf_diff\command_line.py.
  2. Replase this: xml = subprocess.check_output(["pdftotext", "-bbox", fn, "/dev/stdout"]) on: xml = subprocess.check_output(["pdftotext", "-bbox", fn, "-"])
  3. Reinstall.

Cause: The library is trying to get the results of a poppler(pdftotext.exe) in the output stream. When transmitting param the poppler does not understand what the output stream means and tries to find such a file for recording the result. There is no such file and the poppler drops.

P.S. Checked on Windows 10. poppler version: 0.68.0.