How to Show pdf file in C#

We know that PDF is not Microsoft technology, it is created by Adobe system and widely used for document exchange, and based on post script. .Net framework does not provide any library to handles PDF files or it is not easy to handle PDF files in .net.

If we want to show PDF file in .net windows form than we can use many approaches such as we can use web browser control or we can use office library. But except these we can also use Acrobat reader control. Adobe provides an ActiveX COM control that you can add to the C# Toolbox.  It is free component provided by Adobe Acrobat.

Start C# Windows application and add the ‘Adobe PDF Reader’ control to the C# Toolbox.
Right-click on any tab of toolbox and select “Choose Items…’ Select the “COM Components” tab and check “Adobe PDF Reader” and click OK.

display pdf file in the web browser

you can see Adobe PDF Reader control icon in toolbox than you can drag and drop this control on your form.

Adobe PDF Reader control in C#

Add a button control and write code to its click event.

private void button1_Click(object sender, EventArgs e)
  // Create object of Open file dialog clas
     OpenFileDialog dlg = new OpenFileDialog();
     // set file filter of dialog
     dlg.Filter = "pdf files (*.pdf) |*.pdf;";
     if (dlg.FileName!= null)
         // use the LoadFile(ByVal fileName As String) function for open the pdf in control

To use the Reader control, first make sure that you have downloaded and installed the free Acrobat Reader from Adobe.

You can download from here

If you want to more control on the Acrobat Reader control, you can use Adobe Acrobat SDK from their developer center ( And need to purchase from Adobe.

  • Really nice

    Its really nice. You are giving this code for opening AxAcroPDF but now i want to save that opened .pdf file into sql server2008. 
    Please help me. It’s urgent. I am waiting for your reply….
    Please send me code on

    Thanks in advance……….

  • majja

    That is very nice tutorial….Thanks a lot Mr…

    I think (dlg.Filter = “pdf files (*.pdf) |*.pdf;”;)
    line should be corrected like this…
    (dlg.Filter = “all files|*.pdf”;) or should be removed that bracket…

  • saurabh

    Thanks a lot man for provinding this code…
    the code helps me a lot to solve my problem in my application…:) 🙂

  • cw1255

    What version of VS are you using. I’ve tried this with VS2005 & VS2010 with Reader X & XI respectively. The DLL isn’t there. Are you sure you don’t need the full Acrobat installed?

    • The only Acrobat reader should installed on the machine..

      You can verify whether your machine has the DLL or not from the :

      C:Program Files (x86)Common FilesAdobeAcrobatActiveXAcroPDF.dll

      see attached image.