Google App Engine(即“纯Python”):将PDF转换为图像 [英] Google App Engine (So "Pure Python"): Convert PDF to Image

查看:108
本文介绍了Google App Engine(即“纯Python”):将PDF转换为图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Google App Engine中,我需要能够将上传的PDF转换为图片(或者可能是某天的一些平铺图片)以便存储和投放。是否有一个图书馆可以阅读也是100%python的PDF文件(因此它可以与我的应用程序一起上传)?



从我迄今为止收集到的信息来看。 ..




  • PIL 不会读取 PDF文件,只会写入它们。

  • GhostScript 是标准的FOSS PDF阅读器,但我不相信我可以将它与我的应用上传到GAE,因为我不相信它是100%的Python。



还有什么我可以使用的吗?或者甚至可能是我可以调用的Web服务?)解决方案

尚未完全发布)。此处有测试人员注册表单,并提供了更多详细信息的链接。

从文档:

转换可以在PDF,HTML,TXT和图像格式和OCR将在必要时使用。请注意,尽管支持PNG,GIF,JPEG和BMP图像格式作为输入格式,但只有PNG可用于输出。


In Google App Engine, I need to be able to take an uploaded PDF and convert it to an image (or maybe one day a number of tiled images) for storing and serving back out. Is there a library that will read PDF files that is also 100% python (so it can be uploaded with my app)?

From what I've gathered so far...

  • PIL does not read PDF files, only writes them.
  • GhostScript is the standard FOSS PDF reader, but I don't believe I'll be able to upload it with my app to GAE since I don't believe it's 100% python.

Is there anything else I might be able to use? Or maybe even a web service that I can call?)

解决方案

You may want to look into using the GAE Conversion API (not yet fully released). There's a tester signup form here, with a link to further details.

From the doc:

Conversions can be performed in any direction between PDF, HTML, TXT, and image formats, and OCR will be employed if necessary. Note that while PNG, GIF, JPEG, and BMP image formats are supported as input formats, only PNG is available for output.

这篇关于Google App Engine(即“纯Python”):将PDF转换为图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆