GamerBoy SOZ Ответов: 0

Нет ошибки GS-path set laravel . Как я могу добавить путь?


I was trying to convert pdf to image.    
error : InvalidArgumentException No GS-Path set

My ImageMagick and ghostscript is working fine form cmd command line. So how i can set the gs path?


Что я уже пробовал:

Tried using spatie/pdf-to-image

$pdf = new PDF(public_path('approvedprocess-docs/working_files/5e94d32f99505.certificate.pdf'));
$pdf->saveImage(public_path('approvedprocess-docs/working_files/5e94d32f99505.certificate.jpg'));
Tried using org_heigl/ghostscript

    // Create the Ghostscript-Wrapper
    $gs = new Ghostscript ();
    // Set the output-device
    $gs->setDevice('jpeg')
    // Set the input file
       ->setInputFile(public_path('approvedprocess-docs/working_files/5e94d32f99505.certificate.pdf'))
    // Set the output file that will be created in the same directory as the input
       ->setOutputFile('output')
    // Set the resolution to 96 pixel per inch
       ->setResolution(96)
    // Set Text-antialiasing to the highest level
       ->setTextAntiAliasing(Ghostscript::ANTIALIASING_HIGH);
Both case getting error : InvalidArgumentException No GS-Path set

0 Ответов