Questions tagged [pdf2image]

A wrapper around the pdftoppm and pdftocairo command line tools to convert PDF to a PIL Image list.

pdf2image is a Python package that wraps pdftoppm and pdftocairo to convert PDF to a PIL Image object.

Resources

71 questions
0
votes
0 answers

text missing while reading pdf python

Hi i am trying read pdf file in python one of the text as shown below reading as "METER READING DATES: 04 8 2TO05 7 2" below is the my code: pdf_path = pdf_path poppler_path=r'C:\poppler-0.68.0\bin' images =…
san1
  • 455
  • 2
  • 11
0
votes
1 answer

UnidentifiedImageError Google Colab

I try to convert a PDF file into images, using Pdf2Image but I get the following error message: *UnidentifiedImageError: cannot identify image file <_io.BytesIO object at 0x7f241957a950>* When I worked yesterday on the same notebook and the same…
0
votes
0 answers

Why i'm not being able to open more than one file with pdf2image in python

I'm trying to extract text from a pdf, so first I have to convert it to image. I can do it, but just with one pdf with a specific name. If I add another pdf to the folder, or change the name of the pdf I already have, I get this…
Agusms
  • 17
  • 4
0
votes
0 answers

is there a way of converting PDF file to png bytes without using pdf2image

What I'm trying to achieve is to compare two images (engineering drawings as pdf) by uploading them using Streamlit 'st.file_uploader()', the code here works well but how can I do the same without Poppler... import streamlit as st import…
0
votes
0 answers

How to add path to poppler universally in code?

I have a code that uses pdf2image, so it has poppler as a dependency. I want to make this python script an executable that I can share, so I need the following line of code to have the poppler path as a universal path: pages =…
0
votes
0 answers

Running setup.py install for pymupdf did not run successfully

I am attempting to install PyMuPDF on my Mac in a Jupyter Notebook, and when I run the command pip install PyMuPDF I receive back the following error: Running setup.py install for pymupdf did not run successfully. note: This is an issue with the…
0
votes
1 answer

PDF2IMAGE - Path not found

I have problem with convert using pdf2image module. I don't know where is something wrong with the code. When I run program and paste path the error shows. Code below: import os from pdf2image import convert_from_path from tkinter import * from…
0
votes
0 answers

add blank pages to the end of the PDF which has less number of pages using python

I have two PDF file,My problem is read two pdf file and covert to image file. I want to add blank pages to the end of the PDF which has less number of pages, so that the number of pages in both PDFs is same. My question is how to compare and add…
user13303557
0
votes
2 answers

How to install poppler and setup pdf2image on elastic beanstalk

I want to convert PDF to jpeg on my elastic beanstalk python application. I found that pdf2image and poppler can perform the conversion. I run the python application on local successfully. However, for using pdf2image and poppler, I need to install…
0
votes
1 answer

python pdf2image "May not be a PDF file" error

On Centos 8 operating system, I get an error when converting pdf pages to jpg files with Python. from pdf2image import convert_from_path import sys images = convert_from_path("test.pdf",500) for i in range(len(images)): images[i].save('page'+…
Fiko
  • 47
  • 4
0
votes
0 answers

Exe-file is not working as expected after converting a python-script with pyinstaller

I am trying to use python to automate the conversion of pdf-docs into png-docs (pdf2image). So far the python-script works as hoped, but when I try to distribute my little programm to other people (using pyinstaller to convert the script into a…
Jammmme
  • 11
  • 2
0
votes
0 answers

Why is checkmark disappearing when using pdf2image

I am using pdf2image.convert_from_path in python to convert a pdf to images. There is a checkbox with a tick inside it in the pdf. However the tick disappears when I am using the utility. Anybody knows how I can resolve this ?
abhinav kumar
  • 153
  • 1
  • 9
0
votes
1 answer

Using PDF2Image in Code Repository on Palantir Foundry

I am trying to use the library pdf2image in a Code Repository on Palantir Foundry and getting the error pdf2image.exceptions.PDFInfoNotInstalledError: Unable to get page count. Is poppler installed and in PATH? when using the function…
0
votes
1 answer

Convert PDF of single page to image

I am trying to convert pdf to an image using the following code from pdf2image import convert_from_path pages = convert_from_path('Sample.pdf', 50, poppler_path=r'C:\Program Files\poppler-20.11.0\bin') pages[0].save('OutImage.jpg', 'JPEG') The…
YasserKhalil
  • 9,138
  • 7
  • 36
  • 95
0
votes
0 answers

Bad encoding PDF using PDF2IMAGE python

I'm trying to convert PDF to PNG using pdf2image. Normally it's working good, but for one PDF the text is completely different. It seems to be the encoding but I cannot find any way to solve it. pdf2image can handle this case ? Is it possible to…