在WPF中的RichTextBox中打开PDF文件 [英] Open PDF file in RichTextBox in WPF

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

问题描述

我可以在RichTextBox中打开PDF文件吗?

Can I open a PDF file in RichTextBox?

推荐答案

您需要将Acrobat Control for ActiveX或至少使用等效的Adobe Reader 9并用作

You need to use the Acrobat Control for ActiveX or at least the Adobe Reader 9 equivalent and use as

using PdfLib;
namespace WindowsFormsApplication1{
public partial class ViewerForm : Form{
    public ViewerForm()
    {
     InitializeComponent();
     PdfLib.AxAcroPDF axAcroPDF1;
     axAcroPDF1.LoadFile(@"C:\Documents and Settings\jcrowe\Desktop\Medical Gas\_0708170240_001.pdf");
     axAcroPDF1.Show(); }

    private void richTextBox1_TextChanged(object sender, EventArgs e)
    {   } } }

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

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