我需要在PHP中運行inkscape,以便將svg圖像轉換爲PDF。但每次我嘗試:在PHP中運行inkscape
//some PHP code system("inkscape -z --file=svg.svg --export-pdf=pdf.pdf"); //more code
我沒有得到新文件,我得到這在Apache的錯誤日誌。
(inkscape:28607): libgnomevfs-WARNING **: Unable to create ~/.gnome2 directory: Permission > denied
Emergency save activated! Emergency save completed. Inkscape will close now. If you can reproduce this crash, please file a bug at www.inkscape.org with a detailed description of the steps leading to the crash, so we can fix it. ** Message: Error: Inkscape encountered an internal error and will close now.
Segmentation fault
我在使用apache服務器的ubuntu上運行。我能做些什麼來糾正這個問題?
如果Inkscape選項證明太麻煩了,您可以嘗試[TCPDF](http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf),如[在共享的Linux服務器上將SVG轉換爲PDF](http://stackoverflow.com/questions/2143971/svg-to-pdf-on-a-shared-linux-server)。 – Mike 2010-07-10 17:51:35