0

PDF Preview module not creating the image(first page of PDF) in docker (Ubuntu) for Drupal 8.5 version.

I have installed imagick(configured the exce path in imagetoolkit module) and Ghostscript and also configured the PDF Preview to the file filed of my content type.

But when I upload the Pdf file I get below error,

ImageMagick error 1:
convert: no images defined '/var/www/html/web/sites/default/files/pdfpreview/58-samplepdf_9.jpg' @ error/convert.c/ConvertImageCommand/3210.

Could any one please help me to resolve this issue? Please find more details below, PHP version - 7.0; Imagick version- 7.x; Ghostscript version - 9.18; OS - Ubuntu 16.04

I guess ghostscript is creating the issue here. Is there any post installation configuration required in docker that we need do for imagic or ghostscript.

1 Answer 1

2

I found the solution by running the below command in Docker file and run the docker build.

Install ImageMagick

RUN apt-get update && apt-get install -y \ libmagickwand-dev --no-install-recommends \ && pecl install ImageMagick* \ && docker-php-ext-enable ImageMagick

Install GhostScript

RUN apt-get update && apt-get -y install ghostscript && apt-get clean

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.