What would be the best way to create a thumbnail image from a PDF or various other document files?
Asked
Active
Viewed 1,971 times
4
-
could be merged with http://stackoverflow.com/questions/1565344 – Gordon Nov 24 '10 at 16:51
-
better one to merge with http://stackoverflow.com/questions/410859/generate-documents-thumbnails-pdf-word-spreadsheets-etc-from-within-php – Gordon Nov 24 '10 at 16:58
2 Answers
0
You might find some useful answers in this related question.
-
actually, that looks rather like a duplicate than a related question. good find. – Gordon Nov 24 '10 at 16:52
-
-
@Gordon: Well, that one is specific to PDFs while this one also says "various other document files" but they are certainly very similar. – EdoDodo Nov 24 '10 at 16:54
0
In general, you need to be able to "rasterize" the file format to a bitmap at the desired resolution. PDF is Not Easy to render (properly that is). Depending on what those "other formats" are, the difficultly could be anywhere between "trivial" (a bitmap format would just need to be scaled) and "Nigh Impossible" (some proprietary format... MathLab or some such).
How to do all that in PHP? Not really my department. But at least now you know what questions to ask (though none of this might be news to you).

Mark Storer
- 15,672
- 3
- 42
- 80
-
1From the linked question[s], ImageMagick can handle a whole pile of different image formats, scaling, etc. Pretty slick. Not so sure about things like ".doc" and it's ilk. – Mark Storer Nov 24 '10 at 17:02