PDF Thumbnails with Google App Engine (Python)

Is it possible using the python version of the Google engine to create a thumbnail of a PDF file?

The goal is for the user to download the PDF file and see it as a thumbnail on the page.

+4
source share
2 answers

No. This requires a PDF renderer, and as far as I know, in pure Python such a thing does not exist. You will have to use an external service to create thumbnails.

+1
source

You may be able to use Google's image processing services directly, since PDFs are essentially images and PIL can do this , although I have not tried This.

If the direct approach does not work, you can use the following process:

  • Save PDF to blobstore.
  • Open the link.
  • Get a snapshot of the displayed PDF using a service such as http://www.websnapr.com/ .
  • Save this generated image to your blobstore.
+2
source

All Articles