在C#中打印PDF [英] Print Pdf in C#

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

问题描述

我是新来的C#。我一直在寻找全国各地的净关于如何打印PDF格式的教程,但未能找到。

I'm new to c#. I was looking all over the net for tutorials on how to print pdf, but couldn't find one.

后来我想,有没有可能用itextpdf它来阅读,喜欢这里提到的

Then I thought, is it possible to read it using itextpdf, like mentioned here

<一个href="http://stackoverflow.com/questions/2550796/reading-pdf-content-with-itextsharp-dll-in-vb-net-or-c">Reading PDF内容与iTextSharp的在VB.NET或DLL C#

然后打印出来。如果是这样,怎么样?

then print it. If so, how?

推荐答案

一个非常简单的方法是使用一个安装Adobe Reader或其它任何PDF阅读器能够打印的:

A very straight forward approach is to use an installed Adobe Reader or any other PDF viewer capable of printing:

Process p = new Process( );
p.StartInfo = new ProcessStartInfo( )
{
    CreateNoWindow = true,
    Verb = "print",
    FileName = path //put the correct path here
};
p.Start( );

另一种方式是使用第三方组件,例如 PDFView4NET

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

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