There is information about that in the readme of the package: https://github.com/spatie/pdf-to-image#issues-regarding-ghostscript
Feb 2, 2019
4
Level 20
Imagick with Ghostscript on Laravel Forge
I'm trying to use Spatie's pdf-to-image package. https://github.com/spatie/pdf-to-image
I have the following code working on local
$pdf = new Pdf(public_path('test.pdf'));
$pdf->saveImage(storage_path('app/public/test.jpg'));
But when I try to run that code on my Forge provisioned site I get a 500 error. Does anyone know how to get that package working?
Level 20
Thanks for the reply. Turns out my issue was with the ImageMagick poilcy.xml file. I had to enable read access to pdf files. https://stackoverflow.com/a/52661288/988659
Please or to participate in this conversation.