没有从GhostScript PDF到PNG转换的输出文件

Jac*_*lyn 3 linux ghostscript

我有一个两页的PDF我试图转换为PNG文件.当我跑:

gs -sDevice=pngalpha -o=gs-output-%d.png -r400 test1-0.pdf
Run Code Online (Sandbox Code Playgroud)

我明白了:

GPL Ghostscript 9.07 (2013-02-14)
Copyright (C) 2012 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 2.
Page 1
%%BoundingBox: 35 35 577 757
%%HiResBoundingBox: 35.910001 35.910001 576.090022 756.090029
Page 2
%%BoundingBox: 35 35 577 757
%%HiResBoundingBox: 35.910001 35.910001 576.090022 756.090029
Run Code Online (Sandbox Code Playgroud)

然后......没什么.根本没有输出文件.我哪里错了?

Dig*_*uma 7

你太近了,你会发疯;-)

在阅读了一些手册后,这对我有用:

gs -sDEVICE=pngalpha -ogs-output-%d.png -r400 test1-0.pdf
Run Code Online (Sandbox Code Playgroud)

DEVICE代替Device,而-o不是-o=

如果重要,我的gs版本是:

GPL Ghostscript 9.05 (2012-02-08)
Run Code Online (Sandbox Code Playgroud)