我在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不是以%PDF-1.4开头。我还注意到它包含html内容。谁能告诉我,我应该怎么做,以避免html内容被追加到Pdf的自己的内容。
发布于 2012-09-10 15:06:27
zend_pdf document issue in windows 7的副本
将ob_end_clean()放在echo语句之前。
https://stackoverflow.com/questions/12312315
复制相似问题