如何在C#中从Windows应用程序打开PDF文件 [英] How to open PDF file from my windows application in c#

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

问题描述

我有Windows应用程序来保存文章,当我浏览保存的文章时,我想以PDF格式预览此文章,其中该文章以pdf格式保存在硬盘上,我想从硬盘上调用此文章
请帮助我

I have windows application to save articles and when I browsing the saving articles I want to preview this article in PDF format where the article is saving on the hard disk in pdf format and I want to call this article from hard disk
please help me

推荐答案

尝试
Try Process.Start[^] - it allows you to execute any executable from within your program.

Example:
Process.Start("MyPDFPathLocation")


请参阅我对问题的评论.

不幸的是,我不知道任何用于.NET的成熟的非商业PDF查看器,而且我认为我不能在这里推广任何商业广告,所以请自己看看:
http://bit.ly/PQi34w [ ^ ].

现在请记住,对于查看者来说,重要的是要知道要使用哪个UI库,但是您没有指定它(同样,请参见我对问题的评论).

如果需要读取和解析PDF以某种方式访问​​和显示其数据,则可以使用iText库的.NET克隆,称为iTextSharp:
http://en.wikipedia.org/wiki/IText [ http://itextpdf.com/ [ ^ ],
http://sourceforge.net/projects/itextsharp/ [
Please see my comment to the question.

Unfortunately, I don''t know any fully-fledged non-commercial PDF viewers for .NET, and I don''t think I can promote anything commercial here, so look by yourself:
http://bit.ly/PQi34w[^].

Remember now, for the viewer, it''s important to know what UI library do you want to use, but you did not specify it (again, see my comment to the question).

If you need to read and parse PDF to access and present its data somehow, you can use the .NET clone of the iText library called iTextSharp:
http://en.wikipedia.org/wiki/IText[^],
http://itextpdf.com/[^],
http://sourceforge.net/projects/itextsharp/[^].

The reference to original Java version is also important, because probably most (if not all) documentation is there.

—SA


这篇关于如何在C#中从Windows应用程序打开PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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