问题描述
我正在尝试打印当前目录中的所有 pdf.当我在 cmd (singlepdf.sh
) 中调用这个 bash 脚本时:'"C:Program Files (x86)AdobeReader 10.0ReaderAcroRd32.exe"'/t Gemeinde_348_BioID_842_alt.pdf
一切正常.
I'm trying to print all pdfs in current dir.When I call this bash script in cmd (singlepdf.sh
):'"C:Program Files (x86)AdobeReader 10.0ReaderAcroRd32.exe"' /t Gemeinde_348_BioID_842_alt.pdf
everything's working fine.
使用此内容调用 multiplepdfs.sh
时:
When calling multiplepdfs.sh
with this content:
declare -a pdfs=(*.pdf)
for pdf in ${pdfs[@]}; do
echo -e "
printing **$pdf** with AcroRd32.exe...
"
'"C:Program Files (x86)AdobeReader 10.0ReaderAcroRd32.exe"' /t $pdf
sleep 3
done
回声显示文件在循环中被正确寻址 - 但随后我收到错误 "C:Program Files (x86)AdobeReader 10.0ReaderAcroRd32.exe": No such file or目录
The echo shows that files are addressed correctly in the loop - but then I get the error "C:Program Files (x86)AdobeReader 10.0ReaderAcroRd32.exe": No such file or directory
有人可以帮忙解决这个问题吗?
Can someone help out with this issue?
顺便说一句,我已经安装了 msys mingw
BTW, I have msys mingw installed
推荐答案
我知道这是一个老问题,但我最近遇到了同样的问题,但没有一个答案对我有用:
I know this is and old question, but i was faced with the same problem recently and none of the answers worked for me:
- 找不到旧的 Foxit Reader 版本
- 正如@pilkch 所说,2Printer 添加了一个报告页面
- Adobe Reader 打开一个 gui
搜索了一些之后,我发现了这个:http://www.columbia.edu/~em36/pdftoprinter.html.
After searching a little more i found this: http://www.columbia.edu/~em36/pdftoprinter.html.
这是一个使用文件名调用的简单 exe,它会打印到默认打印机(或您指定的打印机).来自网站:
It's a simple exe that you call with the filename and it prints to the default printer (or one that you specify).From the site:
PDFtoPrinter 是一个用于从 Windows 命令行打印 PDF 文件的程序.该程序通常是为 Windows 命令行设计的,也适用于 vDos DOS 模拟器.
要将 PDF 文件打印到默认的 Windows 打印机,请使用以下命令:
To print a PDF file to the default Windows printer, use this command:
PDFtoPrinter.exe filename.pdf
要打印到特定打印机,请在引号中添加打印机名称:
To print to a specific printer, add the name of the printer in quotation marks:
PDFtoPrinter.exe filename.pdf "Name of Printer"
如果要打印到网络打印机,请使用出现在 Windows 打印对话框中的名称,如下所示(并注意名称开头的两个反斜杠和服务器名称后面的单个反斜杠):
If you want to print to a network printer, use the name that appears in Windows print dialogs, like this (and be careful to note the two backslashes at the start of the name and the single backslash after the servername):
PDFtoPrinter.exe filename.pdf "\SERVERPrinterName"
这篇关于从 Windows 命令行打印 PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!