Laravel version 5.5
I have a problem when converting pdf file version from 1.7 to 1.4. I have used this library https://github.com/xthiago/pdf-version-converter for converting pdf file version, which is a simple PHP Library I have integrated this library perfectly in Laravel. I am getting the below error this is Ghostscript error. I am using the mac, I have installed the Ghostscript on my mac but I am getting this error.
sh: gs: command not found
I have changed its base command of this library and set local path but still getting this error.
protected $baseCommand = '/usr/local/bin/gs -sDEVICE=pdfwrite -dCompatibilityLevel=%s -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -dColorConversionStrategy=/LeaveColorUnchanged -dEncodeColorImages=false -dEncodeGrayImages=false -dEncodeMonoImages=false -dDownsampleMonoImages=false -dDownsampleGrayImages=false -dDownsampleColorImages=false -dAutoFilterColorImages=false -dAutoFilterGrayImages=false -dColorImageFilter=/FlateEncode -dGrayImageFilter=/FlateEncode -sOutputFile=%s %s';
I have also tested this command for converting pdf file version. but no result found. thanks in advance.
exec('/usr/local/bin/gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dFastWebView=true -dCompatibilityLevel=1.4 -sOutputFile=public/output.pdf public/uploads/check_pdf_files/Arcofrio.pdf');