如何执行ImageMagick只将多页PDF的第一页转换为JPEG? [英] How to execute ImageMagick to convert only the first page of the multipage PDF to JPEG?

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

问题描述

如果我想要从多页PDF的第一页中获取JPEG ,我该如何执行ImageMagick的转换

How do I execute ImageMagick's convert if I want a JPEG from the first page only of a multi-page PDF?

推荐答案

如果您使用 convert 命令行,可以使用以下参数执行它:

If you are using a convert command line you can execute it with these parameters:

convert  source.pdf[0]  output.jpeg

请注意,ImageMagick的页数是从0开始的。所以 [0] 表示'第1页'。要选择,比如第4页,你必须使用 [3]

Note that the page count of ImageMagick is 0-based. So [0] means 'page 1'. To select, say the 4th page, you'd have to use [3].

这个语法没有仅适用于PDF输入。它还适用于其他多页或多帧格式,例如多页TIFF或动画多帧GIF和PNG。

This syntax does not only work for PDF input. It also works with other multi-page or mult-frame formats, such as multi-page TIFF or animated multi-frame GIFs and PNGs.

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

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