ImageMagick只转换pdf的第一页 [英] ImageMagick is converting only the first page of the pdf

查看:235
本文介绍了ImageMagick只转换pdf的第一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用ImageMagick时遇到了一些麻烦。

I am having some trouble with ImageMagick.

我在Windows 7上安装了GhostScript v9.00和ImageMagick-6.6.7-1-Q16 - 32位

I have installed GhostScript v9.00 and ImageMagick-6.6.7-1-Q16 on Windows 7 - 32Bit

当我在cmd中运行以下命令时

When I run the following command in cmd

转换D:\ test\sample.pdf D:\ test\pages\page.jpg

只有pdf的第一页转换为pdf。我还尝试了以下命令

only the first page of the pdf is converted to pdf. I have also tried the following command

转换D:\ test\sample.pdf D:\ test\pages \page-%d .jpg

这会将第一个jpg创建为page-0.jpg,但不会创建另一个jpg。
如果有人能够对此有所了解,我真的很感激。谢谢。

This creates the first jpg as page-0.jpg but the other are not created. I would really appreciated if someone can shed some light on this. Thanks.

更新:

我使用-debug运行命令所有

I have ran the command using -debug "All"

输出线中的一条线说:

2011-01-26T22:41:49+01:00 0:00.727 0.109u 6.6.7 Configure Magick[5800]: nt-base.c/NTGhostscriptGetString/1008/Configure
registry: "HKEY_CURRENT_USER\SOFTWARE\GPL Ghostscript\9.00\GS_DLL" (failed)

它是否可能与某些事情有关毕竟是GhostScript?

Could it maybe have something to do with GhostScript after all?

推荐答案

您可以通过在文件名后面的[]中添加一个数字来指定要转换的页面:

You can specify which page to convert by putting a number in [] after the filename:

convert D:\test\sample.pdf[7] D:\test\pages\page-7.jpg

但是,它应该使用您的命令将所有页面转换为单个图像。

It should have, however, converted all pages to individual images with your command.

这篇关于ImageMagick只转换pdf的第一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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