Convert PDF to JPG using ImageMagick without Ghostscript

I am trying to convert pdf to jpg using ImageMagick php. ImageMagick seems to need Ghostscript to work with pdf files, however my hosting provider does not allow the installation of Ghostscript because it uses shell_exec() and exec() .

So my question. Can I convert PDF to JPG using ImageMagick without Ghostscript. If not, then there is an alternative. I do this using the wordpress fyi platform.

+8
php imagemagick ghostscript imagemagick-convert
source share
1 answer

PDF is not a raster image format; it is a special language for describing an image. To convert it to a raster format, you will need a RIP (raster image processor) .

ImageMagick uses GhsotScript for this. Therefore, you cannot do this with ImageMagick without GhostScript. You can use GhostScript to render PDF to JPG from the command line that starts gswin32.exe ( even without ImageMagic ), or from your software using gsdll32.dll.

You can also use the Adobe ActiveX component from your software. It is usually already installed on Windows with Adobe Acrobat.

Here is a good explanation and many ways to render PDF

+5
source share

All Articles