使用命令行打印特定的PDF页面 [英] Print a specific PDF page using command line

查看:523
本文介绍了使用命令行打印特定的PDF页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows平台上工作。

I am working in Windows platform.

可以在特定页面上打开PDF文件:

It is possible to open a PDF file at a specific page:

AcroRd32.exe /A "page=3" "file.pdf"

是否有用于打印特定页面的类似解决方案?

Is there a similar solution for printing a specific page? Something like:

AcroRd32.exe /P "page=3" "file.pdf"


推荐答案

是否有用于打印特定页面的类似解决方案?



Is there a similar solution for printing a specific page?


类似的东西:

Something like:



AcroRd32.exe /P "page=3" "file.pdf"

否。没有打印特定页面的选项。

No. There is no option to print a specific page.

您可以做的是将 / p 选项与一个VBS(或类似的)脚本来操纵打印对话框并选择所需的页面进行打印:

What you could do is use the /p option together with a VBS (or similar) script to manipulate the Print dialog and select the required page to print:

AcroRd32.exe / p路径名-执行Adobe Reader并显示打印对话框。

AcroRd32.exe /p pathname — Executes Adobe Reader and displays the Print dialog box.

请参阅以下有关可能的命令行选项的列表。

See below for a list of the possible command line options.


这些是不受支持的命令行,但是对某些开发人员有效。

These are unsupported command lines, but have worked for some developers.

除了下面列出的内容外,没有关于这些命令的文档。您可以从命令行使用Acrobat和Adobe Reader显示和打印PDF文件。

There is no documentation for these commands other than what is listed below. You can display and print a PDF file with Acrobat and Adobe Reader from the command line.

注意:以下所有示例均使用Adobe Reader,但也适用于Acrobat。

NOTE: All examples below use Adobe Reader, but apply to Acrobat as well.

如果使用的是Acrobat,请在命令行上用Acrobat.exe代替AcroRd32.exe。

If you are using Acrobat, substitute Acrobat.exe in place of AcroRd32.exe on the command line.

AcroRd32.exe路径名 —执行Adobe Reader并显示必须提供完整路径的文件。

AcroRd32.exe pathname — Executes Adobe Reader and displays the file, whose full path must be provided.

其他命令行选项为:


  • / n

启动一个单独的Acrobat或Adobe Reader实例,即使当前有一个
已打开。

Launches a separate instance of Acrobat or Adobe Reader, even if one is currently open.

/ s

打开Acrobat或Adobe Reader,抑制启动屏幕。

Opens Acrobat or Adobe Reader, suppressing the splash screen.

/ o

打开Acrobat或Adobe Reader,隐藏打开的文件对话框。

Opens Acrobat or Adobe Reader, suppressing the open file dialog.

/ h

在最小化的窗口中打开Acrobat或Adobe Reader。

Opens Acrobat or Adobe Reader in a minimized window.

AcroRd32.exe / p路径名 —执行Adobe Reader并显示
打印对话框。

AcroRd32.exe /p pathname — Executes Adobe Reader and displays the Print dialog box.

AcroRd32.exe / t路径打印机名称驱动程序名称端口名称
启动Adobe Reader并打印文件,其路径必须完全指定
,同时隐藏打印对话框。

AcroRd32.exe /t path "printername" "drivername" "portname" — Initiates Adobe Reader and prints a file, whose path must be fully specified, while suppressing the Print dialog box.

这四个 / t 选项的参数评估为 path printername
驱动程序名称端口名(所有字符串)。

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


  • 打印机名称 —打印机的名称。

驱动程序名称 —打印机驱动程序的名称,显示在打印机属性中。

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.

来源 Acrobat开发人员常见问题解答

这篇关于使用命令行打印特定的PDF页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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