将多页PDF转换为单个图像 [英] Converting a multiple-page PDF to a single image

查看:119
本文介绍了将多页PDF转换为单个图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用GhostScript将PDF转换为单个图像.

I'm attempting to convert a PDF into a single image using GhostScript.

仅第一页被转换,而我的意图是生成一个可怕的高PNG/JPG图像,其中所有页面都连接在一起.

Only the first page is converted, while my intention is to generate a horrendously tall PNG/JPG image with all the pages concatenated together.

这些是我当前传递给GhostScript DLL(通过.NET应用程序)的参数:

These are the parameters I'm currently passing to the GhostScript DLL (via a .NET application):

pdf2img \
  -dNOPAUSE \
  -dBATCH \
  -dSAFER \
  -sDEVICE=png256 \
  -dGraphicsAlphaBits=4 \
  -dTextAlphaBits=4 \
  -dDOINTERPOLATE \
  -dAlignToPixels=1 \
  -r300x300 \
  -sOutputFile=GLOSS.png \
   GLOSS.pdf

是否可以通过GhostScript将所有页面连接在一起?还是应该诉诸外部方法?

Is it possible to concatenate all the pages together via GhostScript? Or should I resort to an external method?

推荐答案

您是否看过 ImageMagick ?这个免费的库可能有一个选项,可以从PDF创建单个图像(它实际上使用Ghostscript,但增加了许多图形编辑功能,例如合并图像).

Did you have a look at ImageMagick? This free library might have an option to create a single image from a PDF (It actually uses Ghostscript but adds a lot of graphical editing capabilities such as merging images).

这篇关于将多页PDF转换为单个图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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