静音pdf文件打印 [英] Silent pdf file print

查看:83
本文介绍了静音pdf文件打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在不打开Adob阅读器的情况下打印pdf文件.
以下是我正在使用的代码.
///////////////////////////////////////////////////////////////

I want to print a pdf file without opening Adob reader.
Below is the code which I am using.
/////////////////////////////////////////////////////////////

Process p = new Process();
PrintDialog printDlg = new PrintDialog();
p.EnableRaisingEvents = true;
p.StartInfo = new ProcessStartInfo()
{
    CreateNoWindow = true,
    Verb = "print",
    FileName = "C:\Users\vivek.thazhepurayil\Desktop\Test.pdf",
    Arguments = "/d:" + printDlg.PrinterSettings.PrinterName,
    WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden
};
try
{
    p.Start();
}
catch
{
}


////////////////////////////////

但是在打印之后,将弹出Adobe Reader.


//////////////////////////////////////////////

But after printing it, the Adobe Reader is poped up. How to prevent this dobe Reader pop?

推荐答案

检查此链接以杀死adobe应用程序,检查Binayaraj发表的最后一篇文章

http://social.msdn.microsoft.com/Forums/eu/csharpgeneral/thread/56bfe546-680a-45bb-b904-3c9570a6e6a7 [ http://www.dreamincode.net/code/snippet1543.htm [
Check this link to kill adobe application, Check the last post written by Binayaraj

http://social.msdn.microsoft.com/Forums/eu/csharpgeneral/thread/56bfe546-680a-45bb-b904-3c9570a6e6a7[^]

also check this to kill an application.

http://www.dreamincode.net/code/snippet1543.htm[^]


这篇关于静音pdf文件打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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