【发布时间】:2012-02-10 03:19:16
【问题描述】:
我在 windows server 2003(32 位)中遇到 ghost 问题。
在 phpinfo 页面,它显示已安装。 另外,我可以使用命令行界面生成 .png 文件,但是当我尝试使用 PHP 脚本生成 .png 文件时,它不起作用。
$SavedPath = "C:\\Inetpub\\vhosts\\mysite\\httpdocs\\testlib\\images\\";
$pdf_file = "C:\\Inetpub\\vhosts\\mysite\\httpdocs\\testlib\\test.pdf";
$cmd = "gs -sDEVICE=jpeg -dJPEGQ=100 -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -dDOINTERPOLATE -sOutputFile=".$SavedPath."_%d.jpg -dSAFER -dBATCH -dNOPAUSE -r72x72 ".$pdf_file;
Ghostscript is installed on C:\gs\bin\gsdll32.dll.
And exe file is located on C:\gs\bin\gswin32c.exe.
请告诉我,我应该在 Windows 中更改环境变量吗? 我也试过用 conver 命令代替 gs,但没有运气。
【问题讨论】:
标签: ghostscript