Php 转换时出现imagemagick/ghostscript错误
我们正在使用imagemagick将PDF转换为JPEG。使用以下代码:Php 转换时出现imagemagick/ghostscript错误,php,pdf,imagemagick,ghostscript,Php,Pdf,Imagemagick,Ghostscript,我们正在使用imagemagick将PDF转换为JPEG。使用以下代码: shell_exec('convert source.pdf output.jpg'); 我收到这个错误: Segmentation fault convert: Postscript delegate failed `/var/www/location/source.pdf': @ error/pdf.c/ReadPDFImage/663. convert: missing an image filename `/v
shell_exec('convert source.pdf output.jpg');
我收到这个错误:
Segmentation fault
convert: Postscript delegate failed `/var/www/location/source.pdf': @ error/pdf.c/ReadPDFImage/663.
convert: missing an image filename `/var/www/location/output.jpg' @ error/convert.c/ConvertImageCommand/3011.
而且大部分时间都有效。不过我们可以转换一些PDF。那些包含大量文本和表格的文件有一些问题,根本无法转换
我用GS脚本来转换和相同的东西。它不能转换
shell_exec('gs -sDEVICE=jpeg -o output.jpg source.pdf');
- 有没有办法使用imagemagick/gs将这些PDF转换为jpg
- 为了使用imagemagick/gs将pdf转换为jpg,需要避免哪些事情