我的 Zend_Mail 设置完成并且工作正常,但是我的 pdf 附件中的 png 图像被打乱了。
这是负责附件的位:
$filecontents = file_get_contents($attachment);
$att = $this->mail->createAttachment($filecontents);
$att->disposition = 'Zend_Mime::DISPOSITION_INLINE';
$att->encoding = 'Zend_Mime::ENCODING_BASE64';
$att->filename = 'result.pdf';
$att->type = 'application/pdf';
Pdf 是用 Zend_Pdf 创建的
PNG是这样添加的:
$image = Zend_Pdf_Image::imageWithPath("path/to/png.png");
$this->page->drawImage($image, $left, $bottom, $right, $top);
有任何想法吗?
提前致谢!
彼得