Giter Club home page Giter Club logo

Comments (9)

Belval avatar Belval commented on July 29, 2024

1- Open a cmd.
2- Type pdfinfo
3- Press Enter
4- Type pdftoppm
5- Press Enter

If you have any kind of error it probably means that popplers is not installed. Please see the README.md.

from pdf2image.

deepanshuagarwal150 avatar deepanshuagarwal150 commented on July 29, 2024

yes, popplers is not installed.
I have downloaded .7z file, how to install it?

from pdf2image.

Dawny33 avatar Dawny33 commented on July 29, 2024

@deepanshuagarwal150 The details are available in the README file: https://github.com/Belval/pdf2image

from pdf2image.

deepanshuagarwal150 avatar deepanshuagarwal150 commented on July 29, 2024

Thanks for helping..problem is solved.
I have last question that do i need to keep running pdftoppm in separate cmd every time, when i am running my code

from pdf2image.

Dawny33 avatar Dawny33 commented on July 29, 2024

@deepanshuagarwal150 No. Not needed afaik. That command was just for checking whether you have pdftoppm in your system.

from pdf2image.

somnathchoudhuri avatar somnathchoudhuri commented on July 29, 2024

pdfinfo is in path

C:\billimg>pdfinfo
pdfinfo version 0.68.0
Copyright 2005-2018 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
Usage: pdfinfo [options]
-f : first page to convert
-l : last page to convert
-box : print the page bounding boxes
-meta : print the document metadata (XML)
-js : print all JavaScript in the PDF
-struct : print the logical document structure (for tagged files)
-struct-text : print text contents along with document structure (for tagged files)
-isodates : print the dates in ISO-8601 format
-rawdates : print the undecoded date strings directly from the PDF file
-dests : print all named destinations in the PDF
-enc : output text encoding name
-listenc : list available encodings
-opw : owner password (for encrypted files)
-upw : user password (for encrypted files)
-v : print copyright and version info
-h : print usage information
-help : print usage information
--help : print usage information
-? : print usage information

The image is here

C:\billimg>dir
Volume in drive C is Windows
Volume Serial Number is CA9F-491A

Directory of C:\billimg

10/01/2019 04:22 PM

.
10/01/2019 04:22 PM ..
10/01/2019 04:22 PM 108,789 vzbill_paper_5476.pdf
1 File(s) 108,789 bytes
2 Dir(s) 454,567,489,536 bytes free

Still I get this error

C:\billimg>C:\Python36\python
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

from pdf2image import convert_from_path, convert_from_bytes
images = convert_from_path('vzbill_paper_5476.pdf')
Traceback (most recent call last):
File "C:\Python36\lib\site-packages\pdf2image\pdf2image.py", line 350, in _page_count
proc = Popen(command, env=env, stdout=PIPE, stderr=PIPE)
File "C:\Python36\lib\subprocess.py", line 729, in init
restore_signals, start_new_session)
File "C:\Python36\lib\subprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "C:\Python36\lib\site-packages\pdf2image\pdf2image.py", line 80, in convert_from_path
page_count = _page_count(pdf_path, userpw, poppler_path=poppler_path)
File "C:\Python36\lib\site-packages\pdf2image\pdf2image.py", line 355, in _page_count
"Unable to get page count. Is poppler installed and in PATH?"
pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH?

Why?

from pdf2image.

pankajdev73 avatar pankajdev73 commented on July 29, 2024

I am facing the same issue in the windows is there any resolution any got on this please suggest.

Below is the error :
Python36-32\lib\site-packages\pdf2image\pdf2image.py", line 355, in _page_count proc = Popen(command, env=env, stdout=PIPE, stderr=PIPE)

from pdf2image.

Belval avatar Belval commented on July 29, 2024

@pankajdev73 could you provide the full stacktrace, your OS, and the output of pdfinfo when exectued in your terminal/cmd?

from pdf2image.

admondtamang avatar admondtamang commented on July 29, 2024

Solution
Download window version poppler tools from :http://blog.alivate.com.au/poppler-windows/

unzip it and add the location of bin (like C:\somepath\poppler-0.67.0_x86\poppler-0.67.0\bin) to your environment PATH.

restart your CMD and python virtualenv if you are openning

source: https://stackoverflow.com/questions/49508931/filenotfounderror-while-using-the-function-convert-from-path-of-the-package-pd/51781856

from pdf2image.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.