Ghostscript的抑制输出窗口时从命令行调用 [英] Ghostscript suppress output windows when called by command line

查看:552
本文介绍了Ghostscript的抑制输出窗口时从命令行调用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的情况:

我转换成PDF文件,PNG图片Ghostscript的调用由C#。这是参数字符串我用:

I'm converting PDF files to PNG images calling Ghostscript by C#. This is the argument string I use:

-dNOPAUSE -dBATCH -dFirstPage=1 -q -r300   -sDEVICE=png256 -sOutputFile=...

但是,这样一来,当我打电话Ghostscript的它显示一个窗口,(前我已经添加了 -q )有消息输出。

But, in this way, when I call Ghostscript it shows a window where (before I've added -q) there were output messages.

我已经尝试添加 -dNODISPLAY -r300 。但在这样的Ghostscript不起作用,不会产生图像

I've tried adding -dNODISPLAY after -r300. But in this way Ghostscript doesn't work and doesn't create images.

问:
在哪种方式我可以抑制输出窗口?

Question: In which way can I suppress the output window?

推荐答案

如果你想在命令行中运行的Win32 / Win64中的Ghostscript无需它弹出一个单独的窗口(以显示其<标准输出> <标准错误> 的消息,并允许您为< ;标准输入> 输入打字),然后使用这些二进制文件(取决于你对你的本地安装的Ghostscript版本):

If you want to run Win32/Win64 Ghostscript on the commandline without having it popping up a separate window (to display its <stdout> and <stderr> messages and allow you for <stdin> input typing), then use these binaries (depending on your version of your locally installed Ghostscript):


  • gswin32c.exe (注意添加 C 命令 / 控制台

  • gswin64c.exe (注意添加<$ ç$ C> C 为命令 / 控制台

  • gswin32c.exe (note the added c for command/console)
  • gswin64c.exe (note the added c for command/console)

不要使用 gswin32.exe gswin64.exe !这些都是顺着自己的弹出窗口...

Do not use gswin32.exe or gswin64.exe! These are the versions which bring along their own popup windows...

这篇关于Ghostscript的抑制输出窗口时从命令行调用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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