gGt使用Ghostscript为每个文件包含一个PDF页面计数的输出文件 [英] gGt an output file with a count of PDF pages for each file with Ghostscript

查看:86
本文介绍了gGt使用Ghostscript为每个文件包含一个PDF页面计数的输出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此代码对我有用,但我所有的文件都在网络驱动器上.在下面的示例中,仅当文件位于根目录(c:\)中时,该代码才有效.

This code works for me, except all my files are on a network drive. In the example below, the code works only if the file is in the root directory (c:\) as an example.

我必须用d:\hello space folder\filefolder\input.pdf之类的东西替换input.pdf吗?我试过了,但是发现了很多错误,说找不到目录.我尝试做netuse并映射网络主驱动器文件夹,但是那也不起作用.

Do I have to replace input.pdf with something like d:\hello space folder\filefolder\input.pdf? I tried this, but got a sleuth of errors saying directory not found. I tried to do netuse and map the network main drive folder, but that didn't work either.

gswin32c ^
  -q ^
  -dNODISPLAY ^
  -c "(input.pdf) (r) file runpdfbegin pdfpagecount = quit"

推荐答案

您不能在PostScript字符串中使用单个反斜杠,因为这是转义字符.对于路径定界符,您需要使用两个反斜杠\\来转义转义符,或者使用正斜杠/代替.

You can't use a single backslash in a PostScript string, because that's the escape character. For the path delimiter you either need to use two backslashes \\ to escape the escape, or use a forward slash / instead.

这篇关于gGt使用Ghostscript为每个文件包含一个PDF页面计数的输出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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