Referencing the DynamicPDF Viewer Control

The easiest way to reference and deploy DynamicPDF Viewer in your project is by installing the NuGet package from directly within Visual Studio's Package Manager. Alternatively, you can follow the instructions here to reference and deploy the assembly manually.

NOTE: We recommend installing using the NuGet package, as this is the easiest and least error-prone installation method.

Referencing NuGet package

Install the DynamicPDF Viewer for .NET NuGet Packages directly within Visual Studio's Package Manager.

Manual Installation

The DynamicPDF Viewer v3.05 for .NET assemblies are installed at "%ProgramFiles%\DynamicPDF Viewer v3.03 for .NET\bin" on 32-bit computers and "%ProgramFiles(x86)%\DynamicPDF Viewer v3.03 for .NET\bin" on 64-bit computers by default.

Two compiled .NET assemblies are included for use with the .NET Framework 4.x. The following table provides the assembly details.

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

You have two choices for adding the Assembly reference to your project. You can select the PdfViewer control from Visual Studio toolbox, or by selecting "add reference" in your Visual Studio project. Both methods work equally well, depending upon your particular project needs.

Visual Studio Toolbox

The DynamicPDF Viewer MSI installer automatically adds the three DynamicPDF Viewer controls (PdfViewer, PdfViewerToolStrip, and PdfViewerNavigationPanel) to the toolbox of all Visual Studio installations selected during installation. If the toolbox does not contain the PdfViewer control, it can be added manually.

NOTE: Visual Studio only adds the 32-bit versions of the three controls to the Visual Studio toolbox. However, you can target 64-bit applications. For adding a reference to the DynamicPDF Viewer assembly that targets x64 bit platforms, see below

Visual Studio 2010 - 2019

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

When adding the assembly reference, you can add either the x86 or x64 assembly version to your project depending upon your needs.

Visual Studio in Windows x86

To reference the assembly within Visual Studio 2010 - 2019 open the project's references window by right clicking on the project and selecting "Add Reference...". From the Add Reference window, select the DynamicPDF Viewer for .NET x86 (Framework 4.x) from the list on the ".NET" tab. After selecting the assembly, select OK to complete adding the assembly to your project.

Visual Studio in Windows x64

To reference the assembly from Visual Studio 2010 - 2019 open your project's references window by right clicking on the project and selecting "Add Reference...". From the Add Reference window, select Browse and then select the assembly named ceTe.DynamicPDF.Viewer.40.x64.dll.

By default, DynamicPDF Viewer is installed at the following location, depending on if your computer is 32-bit or 64-bit.

NOTE: Do not add multiple assemblies to your applications bin folder to avoid errors and unpredictable results. Also note that the accompanying xml files added by the assembly are used by IntelliSense and are not distributed with your product.

Visual Studio Designer and PdfViewer Controls x64

Because the Visual Studio IDE is 32-bit, Visual Studio Designer cannot open 64-bit form controls. If you attempt opening the design view of an application containing a reference to the x64 DynamicPDF Viewer assembly, then Visual Studio raises an exception and fails to open the assembly. You must use the 32-bit version of Visual Studio Designer.  However, keep in mind that building and debugging an x64 platform application using the DynamicPDF Viewer x64 control works without any issue despite the x64 control not working within the 32-bit Visual Studio Designer.

In this topic