What Would Be Best C# Windows Form Control To Display Rendering of PDF file

I am attempting to create a new application that will read in the contents of an Adobe PDF file that will be stored in a specified location on my local machine and eventually a server. I am wondering what C# control would be the best to display a rendering of the Adobe PDF image when the user clicks on search terms and pulls back a result from the directory in which all of the *.pdf files are stored. (I have attached an image of a generic form to pull back the results and just to display the results in the right hand RichTextBox, or where the control is.) Could someone give me some suggestions as to what would be a good C# Windows Control that would display an Adobe PDF file within the attached image of the Windows form that is part of my project?

Thank you to any suggestions in advance. Archived Email Viewer Sample
thenthorn1010Asked:
Who is Participating?
 
Carlos VillegasConnect With a Mentor Full Stack .NET DeveloperCommented:
Hello, I'm not sure if this is the best way, but if the Adobe Reader is installed in your enviroment, a simple way is to use a System.Windows.Forms.WebBrowser control (you can find it on your control toolbox):
How to display the pdf?
webBrowser1.Navigate(@"C:\Temp\MyFile.pdf");

Open in new window

0
 
nishant joshiConnect With a Mentor Technology Development ConsultantCommented:

public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            webBrowser1.Navigate("jquery_documentation.pdf");
            webBrowser1.Hide();
        }

        private void webBrowser1_Navigating(object sender, WebBrowserNavigatingEventArgs e)
        {
            pictureBox1.Show();
  
        }

        private void webBrowser1_Navigated(object sender, WebBrowserNavigatedEventArgs e)
        {
            pictureBox1.Hide();
            webBrowser1.Show();
        }
    }

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.