【发布时间】:2012-09-07 05:39:41
【问题描述】:
我在magento 1.7中尝试过如下
$pdf = new Zend_Pdf();
....
....
$pdfString = $pdf->render();
header("Content-Disposition: attachment; filename=helloworld.pdf");
header("Content-type: application/x-pdf");
echo $pdfString;
现在的问题是,生成 PDF 时会抛出错误消息:Pdf does not begin with %PDF-1.4。我还注意到它包含 html 内容。谁能告诉我我应该怎么做才能避免 html 内容被附加到 Pdf 自己的内容中。
【问题讨论】:
标签: php zend-framework header http-headers zend-pdf