打印PDF的多个副本多个、副本、PDF

2023-09-03 04:30:24 作者:二手情话

我目前使用下面的code打印使用福昕阅读器软件的PDF文件。现在我的问题是,我想打印一个文件的多个副本。任何人都可以让我知道如何指定打印时在下面的code pdf文件的份数。

我不想使用一个循环来打印PDF格式的多个副本。我想说明它只能作为命令行参数。

任何帮助非常AP preciated:)

 工艺过程=新的System.Diagnostics.Process();
process.EnableRaisingEvents = FALSE;
process.StartInfo.CreateNoWindow = TRUE;
process.StartInfo.FileName = foxitReaderInstalledPath;
字符串参数=的String.Format(@ -  T{0}{1},,this.Path,PRINTERNAME);
process.StartInfo.Arguments =参数;
的Process.Start();
process.WaitForExit();
 

解决方案

据福昕手册没有选择做你想要什么,除了一个循环(你不想使用)。

无论你使用的是PDF库的.NET - 有很多免费的和商业的在那里(例如见的网络库打印PDF文件) - 或使用例如Acrobat Reader以便打印(IIRC它有一个命令行开关来实现你想要的)......

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.

BatchOutput PDF for Mac 批量自动打印PDF文件

[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();

解决方案

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)...

 
精彩推荐