Referencing the DynamicPDF Viewer

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 downloading the zip file containing necessary files from our website https://www.dynamicpdf.com/View-PDF-.NET.aspx.

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. This will add the reference to the Viewer library and adds the necessary native libraries to the project.

Manual Referencing

There are two native libraries and a .NET assembly included to use with the .NET Framework 4.x in the bin folder present in the zip file downloaded from our website. The following table provides the assembly details.

Assembly Name Assembly Version Framework Version Platform
DynamicPDF.Viewer.NETFramework40.dll 3.x 4.x AnyCPU
DPDFViewerNative_x64.dll 3.x x64
DPDFViewerNative_x86.dll 3.x x86

There are two choices for adding the Assembly reference to your project.

Adding Assembly Reference

Open the project's references window by right clicking on the project and selecting "Add Reference...". From the Add Reference window, browse to the DynamicPDF.Viewer.NETFramework40.dll and select OK to complete adding the assembly to your project. Add the necessary native library present in the downloaded folder to the project as per the project's platform and set the build action as embedded resource or content and mark it to copy always.

Visual Studio Toolbox

You can add the Viewer control to the Visual Studio toolbox by right clicking on the toolbox and select Choose Items menu item, browse and select our DynamicPDF.Viewer.NETFramework40.dll from the .NET Components tab.

This will add PdfViewer, PdfViewerToolStrip and PdfViewerNavigationPanel controls to the toolox. You can drag and drop the controls to use in Windows Forms application and this will add the product dll to the project as a reference.

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

Add the necessary native library present in the downloaded folder to the project as per the project's platform and set the build action as embedded resource or content and mark it to copy always.

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

NOTE: The accompanying xml files added by the assembly are used by IntelliSense and are not distributed with your product.

In this topic