编程方式打印在命令行中的多个副本 [英] Programatically print multiple copies from command line

查看:172
本文介绍了编程方式打印在命令行中的多个副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序产生35和55之间的PDF文件,其中我要自动打印一式四份。

My application generates between 35 and 55 PDF files of which I have to automatically print four copies.

所有这些文件都在一个文件夹中。

All these files are in a single folder.

我的要求是使用批处理文件来打印每个文件的四个副本。

My requirement is to use a batch file to print four copies of each file.

我已经安装了Adobe Acrobat Reader软件。

I have Adobe Acrobat Reader installed.

我如何做到这一点?

推荐答案

ADOBE READER只能够直接打印一个副本。然而,没有任何prevents从循环和打印出来的4倍。它可能需要更长的时间,但是,由于文件已被发送到打印机的四倍。

Adobe Reader is only capable of printing a single copy directly. However, nothing prevents you from looping and printing it 4 times. It may take longer, though, since the document has to be sent to the printer four times.

的Acrobat SDK开发者FAQ

AcroRd32.exe /吨路径PrinterName的驱动程序名,端口名 - 启动Adobe Reader和打印文件,而燮pressing打印对话框。该路径必须被完全指定。

AcroRd32.exe /t path "printername" "drivername" "portname" — Start Adobe Reader and print a file while suppressing the Print dialog box. The path must be fully specified.

/吨选项的四个参数计算结果为路径 PrinterName的驱动程序名 PORTNAME (所有字符串)。

The four parameters of the /t option evaluate to path, printername, drivername, and portname (all strings).

PrinterName的 - 打印机的名称结果。
  驱动程序名 - 您的打印机驱动程序的名称,因为它出现在你的打印机的属性结果。
   PORTNAME - 打印机的端口。 PORTNAME 不能包含/字符;如果这样做,输出将被路由到该打印机的默认端口。

printername — The name of your printer.
drivername — Your printer driver’s name, as it appears in your printer’s properties.
portname — The printer’s port. portname cannot contain any "/" characters; if it does, output is routed to the default port for that printer.

所以,你可以使用大概是这样的:

So you can probably use something like this:

for %%F in (*.pdf) do (
  for /L %%i in (1,1,4) do (
    AcroRd32.exe /t "%%~fF" "printername" "drivername" "portname"
  )
)

只需插入相应的值丢失的参数。

Just insert the appropriate values for the missing arguments.

这篇关于编程方式打印在命令行中的多个副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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