如何使用按钮单击在Windows窗体中显示pdf [英] how to display pdf in windows form using button click

查看:104
本文介绍了如何使用按钮单击在Windows窗体中显示pdf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows应用程序中执行项目...我的form1包含不同的文本框....一旦我在按钮上单击form1的详细信息就需要在pdf中显示...之后,我就在文本框中填充数据.请告诉我简单的方法...

hi i am doing project in windows application...my form1 contain different textbox ....once i fill data in textbox after that when i click on button that detail of form1 need to show in pdf.....please tell me easy method to do...

推荐答案

查看此链接.
http://stackoverflow.com/questions/4504442/viewing-pdf- in-windows-forms-using-c-sharp [ ^ ]

http://social.msdn.microsoft.com /Forums/zh-CN/csharpgeneral/thread/f3cbbdec-7e35-46e2-ba8d-b7c78e108e35/ [
check out this link.
http://stackoverflow.com/questions/4504442/viewing-pdf-in-windows-forms-using-c-sharp[^]

http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/f3cbbdec-7e35-46e2-ba8d-b7c78e108e35/[^]

Make sure you get the necessary dll first.
%programfiles&\Common Files\Adobe\Acrobat\ActiveX\AcroPDF.dll

private void InitializeAdobe(string filePath)
{
    try
    {
        this.axAcroPDF1.LoadFile(filePath);
        this.axAcroPDF1.src = filePath;
        this.axAcroPDF1.setShowToolbar(false);
        this.axAcroPDF1.setView("FitH");
        this.axAcroPDF1.setLayoutMode("SinglePage");
        this.axAcroPDF1.Show();
    }
    catch (Exception ex)
    {
        throw;
    }
}



表单关闭时.



When form closes.

this.axAcroPDF1.Dispose();
this.axAcroPDF1 = null;



如果这可以解决您的问题,请标记为解决方案并投票.谢谢



Please mark as solution if this solves your problem and vote. Thanks


您能告诉我该怎么做吗...我尝试了很多...输出没有得到....
can u please tell me how to do this...i tried a lot...output is not getting....


有一个第三方组件,该组件用于查看和编辑pdf,只需在搜索引擎中使用键"ITextSharp"将其下载即可.
There is a third party component which used to view and edit the pdf easily download it using the key "ITextSharp" in search engine


这篇关于如何使用按钮单击在Windows窗体中显示pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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