简体   繁体   中英

PDF Thumbnailer

I am scratching my head with this one, how can you get a screenshot or a thumbnail of a PDF? I am developing a social feed on a web server I have no control over, there is a PDF class but I cant narrow down what it is, and theres no function in there for this task.

You can use google docs

https://docs.google.com/viewer?a=bi&pagenumber=1&url=http://url-of-your-pdf.pdf

It returns a png of the first page, you can then edit it using Imagemagick or similiar

Idea from: How to create thumbnails/screenshots out of PDF files on my Linux server?

To do this serverside, you could use ImageMagick. This allows PDF's to be converted into images on the server, not having to depend on the client's browser to have certain software.

You do need to be able to install ImageMagick on the server though.

A link to a guide can be found here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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