Belval / pdf2image

A python module that wraps the pdftoppm utility to convert PDF to PIL Image object
MIT License
1.6k stars 193 forks source link

convert_from_path returns a blank page to some pdf #179

Open rorivy opened 3 years ago

rorivy commented 3 years ago

When converting pdfs to image, I would sometimes get a blank page as a result. Interestingly, i encounter no problem with similar pdfs.

I have tried some solutions suggested in here like setting use_cropbox=True, updating poppler to 20.12.1 but I still get the same blank page.

I am currently running this on a mac OS.

duarteharris commented 3 years ago

Same here.

Belval commented 3 years ago

This issue has been raised a lot and I find it worrying but I still haven't been able to reproduce it on my side. Can you provide a PDF that returns a blank page?

ZivotSen commented 3 years ago

Hi, same issue here. Also I'm loosing layers in some cases when I convert from pdf to whatever image format.

duarteharris commented 3 years ago

I'm not sure, but maybe it's the same that's been addressed here?

https://github.com/Belval/pdf2image/issues/107

Sylv-Lej commented 3 years ago

Same here !

jan-schaeffer commented 2 years ago

I am currently having the same issue on M1 MBA. I installed pdf2image and poppler using pip as described in the readme. I enclose the pdf I am using as an example. blankpage.pdf

shanusharma06 commented 1 year ago

I am also facing the same issue with convert_from_path. I have tried the previously mentioned poppler-data and font solutions, but nothing works.

Issue: I am trying to convert an editable pdf into an image using convert_from_path. The library is not showing any warning or exception and as a result, it is returning an image with blank editable spaces (having the values in pdf).

Image: image

I have mailed you the pdf.

Thank you in advance!!

elijahmuraoka commented 3 weeks ago

I am also having this issue on my M2 pro, but only in my deployed version of the application using aws lambda and a poppler layer created through this repo: https://github.com/shekolla/poppler_for_arm64_aws_lambda