开发者

PDF Thumbnailing with Google App Engine (Python)

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

The goal is for the user to be able to upload a PDF, and开发者_开发技巧 see it represented as a thumbnail on the page.


You may be able to use Google's imaging services directly, since PDFs are essentially images and PIL can do this, though I haven't tried it.

If the direct approach doesn't work, you may be able to use the following process:

  1. Save the PDF to the blobstore.
  2. Open its link.
  3. Obtain a snapshot of the displayed PDF using a service like http://www.websnapr.com/.
  4. Save that generated image into your blobstore.


No. This requires a PDF renderer, and to the best of my knowledge no such thing exists in pure-Python. You'll have to use an external service to generate thumbnails.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜