pdftoppm output always empty

146 views Asked by At

I use this library pdftoppm that I installed in CentOS 7 from official repository:

sudo yum install poppler-utils

If I run the software to convert PDF file pages to images, all works well. My issue is to try to cover a case when the conversion fails, so I was thinking that the library will throw an error if something goes wrong but it always sends empty output.

Here is a successful command:

pdftoppm -png -rx 300 -ry 300 /home/user/PDF_FILE_NAME.pdf /home/user/PDF_FILE_NAME

All works well I can see my images inside /home/user/PDF_FILE_NAME

Now, if I change the destination to something that does not exist like /home/userXXXX/PDF_FILE_NAME nothing happens, no images are created of course which is normal but at least I should get some errors? Am I wrong or is this how this library works please?

Thanks.

0

There are 0 answers