dongyan3237 2018-12-10 13:11
浏览 52

无法从PHP imagick生成svg到pdf

We have migrated our app from one server to other server. In first server svg to pdf using PHP imagick is working good but in second server imagick returns empty content after conversion. Please help me to resolve the issue. or please provide me what could be reason for this issue.

The code used for the conversion is given below:

$im = new \Imagick();
$im->readImageBlob($svgContent);
$im->setImageFormat('pdf');
echo 'Test1: '. $im->getImageBlob();
$PDFContent = 'data:application/pdf;base64,' . base64_encode($im);
echo 'Test2: '. $PDFContent;

Both Test1 and Test2 displays empty.

when I try $im->setImageFormat('png'); its working.

Please suggest a solution. Thanks in advance.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 chaquopy python 安卓
    • ¥50 Kubernetes&Fission&Eleasticsearch
    • ¥15 CSS实现渐隐虚线框
    • ¥15 有没有帮写代码做实验仿真的
    • ¥15 報錯:Person is not mapped,如何解決?
    • ¥30 vmware exsi重置后登不上
    • ¥15 易盾点选的cb参数怎么解啊
    • ¥15 MATLAB运行显示错误,如何解决?
    • ¥15 c++头文件不能识别CDialog
    • ¥15 Excel发现不可读取的内容