打印多份 pdf 副本
我目前正在使用以下代码使用 Foxit Reader 软件打印 pdf。现在我的问题是我想打印一个文件的多个副本。谁能告诉我如何在下面的代码中打印 pdf 时指定份数。
[编辑] 我不想使用循环打印多份 pdf 副本。我只想将其指定为命令行参数。
非常感谢任何帮助:)
Process process = new System.Diagnostics.Process();
process.EnableRaisingEvents = false;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.FileName = foxitReaderInstalledPath;
string arguments = String.Format(@"-t ""{0}"" ""{1}""", this.Path, printerName);
process.StartInfo.Arguments = arguments;
process.Start();
process.WaitForExit();
I am currently using the below code for printing a pdf using Foxit Reader software. Now my problem is I want to print multiple copies of a file. Could anyone let me know how to specify the number of copies while printing a pdf in the below code.
[Edit]
I dont want to use a loop to print multiple copies of pdf. I want to specify it only as a command line argument.
Any help much appreciated :)
Process process = new System.Diagnostics.Process();
process.EnableRaisingEvents = false;
process.StartInfo.CreateNoWindow = true;
process.StartInfo.FileName = foxitReaderInstalledPath;
string arguments = String.Format(@"-t ""{0}"" ""{1}""", this.Path, printerName);
process.StartInfo.Arguments = arguments;
process.Start();
process.WaitForExit();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
根据 Foxit 手册,除了使用循环(您不想使用循环)之外,没有其他选项可以执行您想要的操作。
要么使用一些用于 .NET 的 PDF 库 - 有很多免费和商业的库(例如,请参见 .NET 库来打印 PDF 文件) - 或者您使用例如 Acrobat reader 进行打印(IIRC 它有一个命令行开关来实现您想要的)...
According to the Foxit manual there is no option to do what you want except with a loop (which you don't want to use).
Either you use some PDF library for .NET -there are plenty free and commercial ones out there (see for example .NET library to print PDF files )- or you use for example Acrobat reader for printing (IIRC it has a commandline switch to achieve what you want)...
只需将其放入循环即可。您以后随时可以操纵该进程的终止。
最好将它放在参数中,但据我所知,FoxIt 不支持它。
Just put that in a loop. You can always manipulate the termination of the process later.
It'd be nice to put it in the Arguments, but I don't think FoxIt supports it that I know of.