Referencing the DynamicPDF Viewer
The easiest way to reference and deploy DynamicPDF Viewer in your project is by installing the NuGet package directly within Visual Studio's Package Manager. Alternatively, you can follow the instructions to reference and deploy the assembly manually by downloading the zip file containing the 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. It will add the reference to the Viewer library and the necessary native libraries to the project.
- NuGet: ceTe.DynamicPDF.Viewer.NET (https://www.nuget.org/packages/ceTe.DynamicPDF.Viewer.NET)
There are two native libraries, and a .NET assembly is included to use with the .NET Framework 4.x in the bin folder in the zip file downloaded from our website. The following table provides the assembly details.
|Assembly Name||Assembly Version||Framework Version||Platform|
There are two choices for adding the Assembly reference to your project. You can add the assembly reference through the project's menu or use Visual Studio Toolbox to add the control.
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. 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 selecting Choose Items menu item. Select DynamicPDF.Viewer.NETFramework40.dll from the .NET Components tab. The PdfViewer, PdfViewerToolStrip, and PdfViewerNavigationPanel are added as controls in the toolbox. You can drag and drop the controls to use in the Windows Forms application, and this will add the product DLL to the project as a reference.
|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. 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. See below for a reference to the DynamicPDF Viewer assembly that targets x64-bit platforms.
NOTE: The accompanying XML files added by the assembly are used by IntelliSense and are not distributed with your product.