在C#中打印后,Adobe不会关闭 [英] Adobe does not get closed after printing in C#

查看:368
本文介绍了在C#中打印后,Adobe不会关闭的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我想静静地打印pdf文档。

但是adobe在打印文档后没有关闭。



我试过以下代码。它适用于所有类型的文件,但对于pdf文档失败。

我在google上发现,我找到了在打印文档后杀死adobe exe的选项。

是否有任何一个有更好的解决方案吗?



提前致谢,

Pushkar



我尝试过:



处理oProcess = 进程(); 
oProcess.StartInfo.FileName = PDFFilePath;
oProcess.StartInfo.UseShellExecute = true ;
oProcess.StartInfo.CreateNoWindow = true ;
oProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
oProcess.StartInfo.Verb = print;
oProcess.Start();
oProcess.WaitForExit();
成功= true ;

解决方案

如何使用Adobe Reader和C#静默打印PDF [] a href =http://www.codeproject.com/Tips/598424/How-to-Silently-Print-PDFs-using-Adobe-Reader-andtarget =_ blanktitle =New Window> ^

Hi All,

I want to print pdf document silently.
But adobe does not get closed after printing of document.

I have tried following code. It works for all type of documents but failed for pdf document.
I serached on google, i found the option to Kill adobe exe after printing of document.
Does any one have better solution than this?

Thanks in advance,
Pushkar

What I have tried:

Process oProcess = new Process();
oProcess.StartInfo.FileName = PDFFilePath;
oProcess.StartInfo.UseShellExecute = true;
oProcess.StartInfo.CreateNoWindow = true;
oProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
oProcess.StartInfo.Verb = "print";
oProcess.Start();
oProcess.WaitForExit();
Success = true;

解决方案

How to Silently Print PDFs using Adobe Reader and C#[^]


这篇关于在C#中打印后,Adobe不会关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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