pdf2image icon indicating copy to clipboard operation
pdf2image copied to clipboard

1 page missing/Blank image when converting from pdf to images

Open arpitchoudhary-gep opened this issue 5 years ago • 7 comments

Describe the bug I was trying to convert a pdf to images using the module and one of the page is missing, getting a blank image.

Screenshots For all the pages the font style and size looks like this : image

For the page which is being skipped it looks like this : image

essentially rest of the pages are typed and the error page is scanned.

Please tell me if I am missing any settings or attributes which can fix this.

arpitchoudhary-gep avatar May 08 '19 09:05 arpitchoudhary-gep

Thank you for using the official bug report template. It helps.

Can you tell me what OS and function call were used to convert your PDF?

Also, I you can send me the actual PDF so I'd have a test case it would be great.

If you feel that your PDF is somewhat sensible (but obviously not confidential) you can send it at [email protected] instead of posting it publicly.

Thank you.

Belval avatar May 08 '19 10:05 Belval

Thanks for your fast reply.

I am using windows, convert_from_path function. I will be sending you pdf via email, i will also try to run in it linux.

-Arpit.

arpitchoudhary-gep avatar May 08 '19 10:05 arpitchoudhary-gep

Sorry i'm unable to send the pdf as it contains confidential information and when i tried to hide it, it changes the structure and then it is able to give the text instead of blank page.

-Arpit

arpitchoudhary-gep avatar May 08 '19 11:05 arpitchoudhary-gep

No problem. I remember someone else having a similar problem and I think it was fixed by using cropbox=True.

You should also try to convert it directly with the pdftoppm and pdftocairo executables.

Belval avatar May 08 '19 11:05 Belval

Closing for inactivity. Feel free to reopen.

Belval avatar Jun 07 '19 12:06 Belval

Closing for inactivity. Feel free to reopen.

No problem. I remember someone else having a similar problem and I think it was fixed by using cropbox=True.

You should also try to convert it directly with the pdftoppm and pdftocairo executables.

Unfortunately, I cannot understand how to convert my pdf directly with 'pdftopmm'. Can you elaborate it with an example?

MahsaSeifikar avatar Aug 17 '19 05:08 MahsaSeifikar

Of course, (reopening)

To convert the image with pdftoppm, open a terminal (or cmd on Windows) and enter:

pdftoppm -r 200 -cropbox -jpeg in.pdf out

You should see at least one .jpeg file that you can open to see if the conversion was successful.

For all of the above to work, you need to have pdftoppm in your PATH.

Belval avatar Aug 17 '19 22:08 Belval