PDF Preview module not working in ubuntu for Drupal 8.5 version
I found the solution by running the below command in Docker file and run the docker build.

Install ImageMagick

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

Install GhostScript

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