[英]Yii create PDF Thumbnail with ImageMagick
如果我上载PDF,我想创建自动缩略图,然后我将保存该路径,并使用yii框架构建网站,并尝试使用ImageMagick Any Body Help..Thx进行捕获。
I am also using Yii framework to generate the image file. 我也使用Yii框架生成图像文件。 It is pretty simple and straight forward. 这非常简单直接。 I am using window XP/apache and php 5.4 我正在使用Windows XP / apache和php 5.4
Write a method in your model class to handle conversion 在模型类中编写一个方法来处理转换
use command : command format OR 使用命令: 命令格式或
use library : php manual 使用库: php手册
check if the image is saved at the desired location. 检查图像是否保存在所需位置。 I hope that help. 希望对您有所帮助。 Let me know if you face any issue. 让我知道您是否遇到任何问题。
I know you asked about ImageMagick but maybe you could use GD instead to accomplish such simple operation. 我知道您问过ImageMagick,但也许您可以使用GD来完成这种简单的操作。 It's available virtually on every hosting. 它实际上可在每个主机上使用。
Examples in comments below docs. 文档下方评论中的示例。
http://php.net/manual/en/book.image.php http://php.net/manual/zh/book.image.php
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.