将pdf转换为png [英] convert pdf to png
问题描述
我需要从reportlab获取pdf输出并为网页创建预览图像
。 png什么的。我相信ghostscript会参与其中。
我猜PIL或ImageMagic?
欢迎所有的吸烟。
Carl K
I need to take the take the pdf output from reportlab and create a preview image
for a web page. so png or something. I am sure ghostscript will be involved.
I am guessing PIL or ImageMagic ?
all sugestions welcome.
Carl K
推荐答案
2007年12月24日上午7:53,Carl K< ca ** @ personnelwareware.comwrote:
On Dec 24, 2007 7:53 AM, Carl K <ca**@personnelware.comwrote:
我需要从reportlab获取pdf输出并为网页创建预览图像
。 png什么的。我相信ghostscript会参与其中。
我猜PIL或ImageMagic?
欢迎所有的吸烟。
Carl K
-
http://mail.python.org/mailman/listinfo/python-list
PIL对pdf文件的支持是只写的,这是不可能的。
我刚刚从控制台尝试了ImageMagik,它将pdf转换为
png,所以这似乎是你最好的选择。
-
nasser
PIL''s support for pdf files is write only, so thats out of the question.
I just tried ImageMagik from the console and it converted a pdf into
png in a snap, so that seems to be your best bet.
--
nasser
Carl K写道:
Carl K wrote:
我需要从reportlab获取pdf输出并为网页创建一个
预览图像。 png什么的。我相信
ghostscript将参与进来。我猜PIL或ImageMagic?
欢迎所有的吸烟。
I need to take the take the pdf output from reportlab and create a
preview image for a web page. so png or something. I am sure
ghostscript will be involved. I am guessing PIL or ImageMagic ?
all sugestions welcome.
如果是多页pdf Imagemagick会做:
convert file.pdf page-%03d.png
Jaap
If it is a multi page pdf Imagemagick will do:
convert file.pdf page-%03d.png
Jaap
Jaap Spies写道:
Jaap Spies wrote:
Carl K写道:
Carl K wrote:
>我需要拍摄pdf从reportlab输出并为网页创建
预览图像。 png什么的。我确定
ghostscript将参与进来。我猜PIL或ImageMagic?
欢迎所有的吸烟。
>I need to take the take the pdf output from reportlab and create a
preview image for a web page. so png or something. I am sure
ghostscript will be involved. I am guessing PIL or ImageMagic ?
all sugestions welcome.
如果是多页pdf Imagemagick会做:
转换file.pdf page-%03d.png
If it is a multi page pdf Imagemagick will do:
convert file.pdf page-%03d.png
我需要python代码才能执行此操作。它将在别人的共享
主机Web服务器上运行,安全性和性能是一个问题。所以我宁愿不要通过popen运行东西。我还需要一些易于安装的东西。 (
easy_install或发行包)
我只是看看安装PythonMagick需要什么:
安装要求是:
提升
boost-python
python 2.5
Magick ++(> = 6.2 )
和建筑:
pkg-config
libtool
make
看起来可能不容易安装
因此我需要制作一个easy_install-able .tgz或其他一些制作图像的方法。 />
Carl K
I need python code to do this. It is going to be run on a someone else''s shared
host web server, security and performance is an issue. So I would rather not
run stuff via popen. I also need something that is easy to install. (either
easy_install or a distro package)
I just looked at what it takes to install PythonMagick:
Requists for installation is:
boost
boost-python
python 2.5
Magick++ (>= 6.2)
and for building:
pkg-config
libtool
make
That is looking like maybe "not easy to install"
so I need to make an easy_install-able .tgz or some other way of making the image.
Carl K
这篇关于将pdf转换为png的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!