使用c#.net打印pdf文件 [英] printing a pdf file using c#.net
本文介绍了使用c#.net打印pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试以编程方式打印pdf文档。每当我打印文档时,只有第一页被打印..以下是我的代码..
ProcessStartInfo info = new ProcessStartInfo(Path);
info.Verb = Print;
info.CreateNoWindow = true ;
info.WindowStyle = ProcessWindowStyle.Hidden;
处理printDwg = new Process();
printDwg.StartInfo = info;
printDwg.Start();
我的代码错了..
请帮忙
解决方案
阅读本文:使用C#代码打印任何文档文件而不打开文档
如果您想快速修复,可以使用 .NET组件打印pdf和其他文件 [ ^ ]
或者你可以使用这个解决方案 [ ^ ]
i am trying to print a pdf document programitically. whenever i print the document only the first page gets printed.. following is my code..
ProcessStartInfo info = new ProcessStartInfo(Path);
info.Verb = "Print";
info.CreateNoWindow = true;
info.WindowStyle = ProcessWindowStyle.Hidden;
Process printDwg = new Process();
printDwg.StartInfo = info;
printDwg.Start();
wats wrong with my code..
please help
解决方案
Hi,
Read this article : Print any Document File using a C# Code without Opening Documents
If you want a quick fix, you could use a .NET component for printing pdf and other files[^]
Or you can just use this solution[^]
这篇关于使用c#.net打印pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文