sorl-thumbnail multi-page pdfs

北城以北 提交于 2019-12-24 10:01:02

问题


It is possible to use sorl to thumbnail multi-page pdfs? I know you need to use the ImageMagick back end to use pdfs at all. But I am having no success with multi-page pdfs. Looking at the source I think it is because the convert command when it sees multi-page pdfs such as foo.pdf creates a set named foo-1.jpg foo-2.jpg etc... and I don't think sorl expects to see this type of output from 1 file. Is there a way to do this/workaround/patch?


回答1:


I needed to solve this myself and made an adjustment which modifies the call to convert.

See my patch here:

https://github.com/jamting/sorl-thumbnail/commit/6a4d705db3529640a9e193044b615f24ff96eef4

HTH!



来源:https://stackoverflow.com/questions/7394048/sorl-thumbnail-multi-page-pdfs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!