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.
- NuGet: ceTe.DynamicPDF.Viewer.NET (https://www.nuget.org/packages/ceTe.DynamicPDF.Viewer.NET)
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|
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.
|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.