Windows上的Ghostscript导致-dPDFSETTINGS的无效选项 [英] Ghostscript On windows leads to Invalid option for -dPDFSETTINGS

查看:88
本文介绍了Windows上的Ghostscript导致-dPDFSETTINGS的无效选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处解决我的问题,方法是在Windows上压缩/缩小由MikTeX生成的PDF文件,我正在在Cmder上尝试此bash脚本:

To solve my problem here with compressing/down-sizing a PDF file generated by MikTeX on Windows, I am trying this bash script on Cmder as:

shrinkpdf.sh in.pdf > out.pdf

但是我得到了错误:

选项-dPDFSETTINGS = C:/Program Files/Git/screen的值无效,请使用-sNAME =定义字符串常量

Invalid value for option -dPDFSETTINGS=C:/Program Files/Git/screen, use -sNAME= to define string constants

我想这与行有关

-dPDFSETTINGS=/screen

如果您能帮助我知道问题出在哪里以及如何解决,我将不胜感激.

I would appreciate it if you could help me know what is the problem and how I can solve it.

我的环境是:

  • Windows操作系统: 1809
  • Cmder: 1.3.14
  • Ghostscript: 9.27

推荐答案

我遇到了同样的问题,并使用双斜杠解决了这个问题:而不是"/屏幕".这是由于mingw试图变得聪明并替换了"/".与GIT主目录.

I ran into the same issue and I fixed it using a double slash: "//screen" instead of "/screen". This is due to mingw that is trying to be smart and replace "/" with GIT home directory.

参考: https://github.com/moby/moby/issues/24029#issuecomment-250412919

这篇关于Windows上的Ghostscript导致-dPDFSETTINGS的无效选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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