Referencing the Control

The Assemblies used for DynamicPDF Viewer v3.03 for .NET are installed at "%ProgramFiles%\DynamicPDF Viewer v3.03 for .NET\bin" on 32-bit machines and "%ProgramFiles(x86)%\DynamicPDF Viewer v3.03 for .NET\bin" on 64-bit machines by default. There are two .NET assemblies included that are compiled for use with the .NET Framework 4.x. The table below gives the details of each assembly.

Assembly Name Assembly Version Framework Version Platform
DynamicPDF.Viewer.NETFramework40.x86.dll 3.x.x.40 4.x x86
DynamicPDF.Viewer.NETFramework40.x64.dll 3.x.x.40 4.x x64

Adding assembly reference by selecting the PdfViewer controls from Visual Studio toolbox.

The DynamicPDF Viewer MSI will automatically add the DynamicPDF Viewer controls to the toolbox of all Visual Studio that are selected for integration during installation.

Note: 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. For adding reference of “DynamicPDF Viewer” assembly for projects targeting x64 bit platform refer “Adding assembly reference by selecting Add Reference” topic below.

If the toolbox does not contain the PdfViewer control, it must be added manually.

A Visual Studio toolbox will contain three PdfViewer controls inside its toolbox.

Visual Studio 2010 - 2019

  1. For .NET 4.x projects select the PdfViewer controls present under “DynamicPDF Viewer for .NET 4.x”

viewer tool box
Figure 1 – Visual Studio 2010 to 2019 Toolbox Integration Viewer Controls

Adding assembly reference by selecting “Add Reference”.

Visual Studio in Windows x86

To reference our assembly from Visual Studio 2010 - 2019 open your project's references window (right click on the project and select "Add Reference..."). From the Add Reference window select the "DynamicPDF Viewer for .NET x86 (Framework 4.x)" from the list on the ".NET" tab. Hit OK to complete this.

Visual Studio in Windows x64

To reference our assembly from Visual Studio 2010 - 2019 open your project's references window (right click on the project and select "Add Reference..."). From the Add Reference window select Browse and choose the assembly ceTe.DynamicPDF.Viewer.40.x64.dll. It will be inside the bin folder located at the DynamicPDF Viewer installed location.

By default DynamicPDF Viewer will be installed in the following location.

                For 32-bit machines: “%ProgramFiles%\DynamicPDF Viewer v3.03 for .NET\bin”.

                For 64-bit machines: “%ProgramFiles(x86)%\DynamicPDF Viewer v3.03 for .NET\bin”.

Note: Make sure you have not placed more than one of the above assemblies in your applications bin folder. Placing more than one of them in your bin folder can cause errors and unpredictable results. The accompanying xml files are for IntelliSense and do not need to be distributed with your product.

Visual Studio Designer and PdfViewer Controls x64

Visual Studio’s designer cannot open any 64-bit form control (since the Visual Studio IDE is a 32-bit process). Because of this, whenever you attempt to open the design view of a Windows Form application that contains a reference to the x64 version of the DynamicPDF Viewer assembly, Visual Studio will throw an error and fail to open it. If there is a need for the design view to be opened, the referenced version of the DynamicPDF Viewer control needs to be changed to the 32-bit version.  Keep in mind however that building and debugging of an x64 platform application using the DynamicPDF Viewer x64 control will work without any issue.

In this topic