简体   繁体   English

Rails:attachment_fu插件,将PDF上传文件转换为图像

[英]Rails: attachment_fu plugin, convert PDF uploads to image

Yo,

I've got attachment_fu set up on my server, and it works just fine. 我在服务器上设置了attachment_fu,它正常工作。 My goal, however, is to be able to upload PDFs and have them convert to image (then use all the pre-built attachment_fu options like resize and thumb produce the desired images). 但是,我的目标是能够上传PDF并将其转换为图像(然后使用所有预建的attach_fu选项(如resize和thumb生成所需的图像))。 What currently happens is that PDFs upload and remain PDFs, whereas images go through all the motions of resizing and whatnot. 当前发生的情况是PDF上载并保留为PDF,而图像则经历了所有调整大小的动作。

How can I get the functionality I want? 如何获得所需的功能? Is there a simple way to go about doing this using the tools I already have, or should I just manually invoke RMagick to do the initial conversion? 有没有简单的方法可以使用现有工具进行此操作,还是应该手动调用RMagick进行初始转换? If so, how can I do that and then pass off the file to attachment_fu for handling? 如果是这样,我该怎么做,然后将文件传递给attachment_fu进行处理?

Thanks, --Matchu 谢谢--Matchu

对于最古老的未解决的Rails问题: https : //stackoverflow.com/a/69804/156561,他的回答可能非常类似于让您使用Attachment_fu,我敢肯定您现在已经迁移了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM