Skip to main content

Overview

Version: 1.0

DynamicPDF Viewer For .NET Programming Overview

Below is a walkthrough of getting DynamicPDF Viewer up and working within a simple Visual Studio 2010, C# Windows Form application. Before proceeding through these steps, make sure that you download the latest version of DynamicPDF Viewer for .NET from our website (https://www.dynamicpdf.com/View-PDF-.NET.aspx) and run that MSI on the machine you wish to setup the demonstration example.

1. Create or open a C# Windows Form application in Visual Studio 2010.

2. Open the Toolbox (Ctrl + Alt + X).

3. If DynamicPDF Viewer tab is not present in the Toolbox.

4. Right click inside the Toolbox and select "Choose Items…".

   ("Visual Studio allows only 32-bit version of the control to be added into its toolbox. All the controls that are added by DynamicPDF Viewer MSI into the toolbox will also be 32 bit.")

5. From the "Choose Toolbox Items" dialog, click on the ".NET Framework Components" tab and select the "PdfViewer" control from the list and click OK.

Note: If the PdfViewer control does not appear under the “.NET Framework Components” tab, you can browse directly to the location in which it was installed (by default that location is “%ProgramFiles%\ceTe Software\DynamicPDF Viewer v1.x.x for .NET\bin” on 32-bit machines and “%ProgramFiles(x86)%\ceTe Software\DynamicPDF Viewer v1.x.x for .NET\bin” on 64-bit machines) and the DLL begins with “ceTe.DynamicPDF.Viewer”.

6. From the Toolbox, drag the DynamicPdfViewer control onto the form.

7. Select the control and set its Name property to "pdfViewer".

8. Re-size, position and set any additional properties as needed.

9. Double click on an empty part of the form and add the following line of code to the Form_Load method:

pdfViewer.Open(@"C:\Temp\HelloWorld.pdf");

Note: Make sure there is a valid PDF document in whatever location you specify above.

10. Run the application to see the PDF specified in step 9 appear on the form.

Note: These instructions will work with older versions of Visual Studio as well, with a few slight differences.

Documentation version