将PDF转换为TIFF,600dpi和jpg 96 dpi [英] convert PDF into TIFF with 600dpi and jpg 96 dpi

查看:1117
本文介绍了将PDF转换为TIFF,600dpi和jpg 96 dpi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用ImageMagick将pdf转换为600 dpi的tiff和来自Python脚本的96 dpi的jpg。

I want to convert pdf into tiff with 600 dpi and jpg with 96 dpi from Python script using ImageMagick.

我使用(imagemagick)命令行完成了此任务但是我想在python中使用Imagemagick将pdf转换为tiff和jpg,

i was done this task using (imagemagick) command line but i want to convert pdf into tiff and jpg using Imagemagick in python ,

你可以帮助我......

can you please help me for that......

推荐答案

使用 PythonMagick

import PythonMagick

img = PythonMagick.Image()
img.density('600')  # you have to set this here if the initial dpi are > 72

img.read('test.pdf') # the pdf is rendered at 600 dpi
img.write('test.tif')

img.density('96')  # this has to be lower than the first dpi value (it was 600)
# img.resize('100x100')  # size in px, just in case you need it
img.write('test.jpg')  

这篇关于将PDF转换为TIFF,600dpi和jpg 96 dpi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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