如何将 PDF 电子邮件附件转换为 PHP 页面中的图像 (jpg)?
老观众了,第一次提问。
我试图让我的个人网站通过我的邮箱解析某个订阅列表中的附件,然后能够以图像形式查看 PDF 附件,最好是 jpg。
提前致谢!
Long time viewer, first time question asker.
I'm trying to have my personal website parse through my mail box for attachments from a certain subscription list, and then be able to view the PDF attachments as images, preferably jpg.
With the help of this: http://www.linuxscope.net/articles/mailAttachmentsPHP.html
I'm currently using imap_base64() to decode the MIME data and create the PDF. However, I hate using PDF readers in general and I thought it would be a lot more streamlined if I could just view it as an image instead. I've heard for convert with ImageMagick, but would I need to actually write the PDF to a directory before using this, or can I convert somehow directly from the MIME data in the email?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
安装并使用 Imagick PHP 模块: http://www.php.net/手册/en/book.imagick.php
Install and use the Imagick PHP module: http://www.php.net/manual/en/book.imagick.php