Referencing the Control
The Assemblies used for DynamicPDF Viewer v1.x.x for .NET are installed at "%ProgramFiles%\ceTe Software\DynamicPDF Viewer v1.x.x for .NET\bin" on 32-bit machines and "%ProgramFiles(x86)%\ceTe Software\DynamicPDF Viewer v1.x.x for .NET\bin" on 64-bit machines by default. There are six .NET assemblies included that are compiled for use with the .NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2 and 4.6. The table below gives the details of each assembly.
| Assembly Name | Framework Version | Platform |
|---|---|---|
| ceTe.DynamicPDF.Viewer.20.x86.dll | 2.0 and 3.0 | x86 |
| ceTe.DynamicPDF. Viewer.20.x64.dll | 2.0 and 3.0 | x64 |
| ceTe.DynamicPDF. Viewer.35.x86.dll | 3.5 | x86 |
| ceTe.DynamicPDF. Viewer.35.x64.dll | 3.5 | x64 |
| ceTe.DynamicPDF. Viewer.40.x86.dll | 4.x | x86 |
| ceTe.DynamicPDF. Viewer.40.x64.dll | 4.x | x64 |
Adding assembly reference by selecting the PdfViewer control from Visual Studio toolbox.
The DynamicPDF Viewer MSI will automatically add the DynamicPDF Viewer control 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, refer the steps 4 & 5 in the Overview topic for adding it manually.
A Visual Studio toolbox will contain one or more PdfViewer Control inside its toolbox based on the .NET version of the project.
-
Visual Studio 2005
Click on “DynamicPDF Viewer for .NET 2.0 & 3.0” control which presents under “DynamicPDF Viewer” tab and place it inside in the Windows Forms.
| Figure 1 – Visual Studio 2005 Toolbox Integration Viewer Control |
-
Visual Studio 2008
There will be two controls present under “DynamicPDF Viewer” tab in the Visual Studio toolbox. Select the control based on the .NET framework of the target project.
For .NET 2.0 and 3.0 framework projects select the “DynamicPDF Viewer for .NET 2.0 & 3.0” control from the toolbox.
For .NET 3.5 framework projects select the “DynamicPDF Viewer for .NET 3.5” control from the toolbox.
Note: Visual Studio will filter the unsupported framework control based on the current project’s .Net framework. If the current project’s .NET framework is .NET 2.0 or 3.0, then “DynamicPDF Viewer for .NET 3.5” will not be present in the toolbox.
| Figure 2 – Visual Studio 2008 Toolbox Integration Viewer Control |
-
Visual Studio 2010, 2012, 2013 & 2015
There will be three different tabs inside the Visual Studio toolbox containing the PdfViewer control for the respective framework.
For .NET 2.0 & 3.0 projects select the PdfViewer control present under “DynamicPDF Viewer for .NET 2.0 & 3.0”
For .NET 3.5 projects select the PdfViewer control present under “DynamicPDF Viewer for .NET 3.5”
For .NET 4.0, 4.5 , 4.5.1, 4.5.2 and 4.6 projects select the PdfViewer control present under “DynamicPDF Viewer for .NET 4.x”
Note: Visual Studio will filter the unsupported framework control based on the current project’s .Net framework. If the current project’s .NET framework is .NET 2.0 or 3.0 or 3.5, then “DynamicPDF Viewer for .NET 4.x” tab and its control will not be present in the toolbox.
Note: Adding multiple PdfViewer control of different .NET framework inside a same form or different form in the same project will add multiple references of DynamicPDF Viewer assembly to the project. This will raise a compiler error.
![]() | ![]() | ![]() | ![]() |
| Figure 3 – Visual Studio 2010 Toolbox Integration Viewer Control | Figure 4 – Visual Studio 2012 Toolbox Integration Viewer Control | Figure 5 – Visual Studio 2013 Toolbox Integration Viewer Control | Figure 6 – Visual Studio 2015 Toolbox Integration Viewer Control |
Adding assembly reference by selecting “Add Reference”
-
Visual Studio in Windows x86
To reference our assembly from Visual Studio 2005 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 2.0 and 3.0)" from the list on the ".NET" tab. Hit OK to complete this.
To reference our assembly from Visual Studio 2008 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 3.5)" from the list on the ".NET" tab. Hit OK to complete this.
To reference our assembly from Visual Studio 2010, Visual Studio 2012, Visual Studio 2013 and Visual Studio 2015 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.0, 4.5, 4.5.1, 4.5.2 & 4.6)" from the list on the ".NET" tab. Hit OK to complete this.
-
Visual Studio in Windows x64
To reference our assembly from Visual Studio 2005 open your project's references window (right click on the project's and select "Add Reference..."). From the Add Reference window select Browse and choose the assembly ceTe.DynamicPDF.Viewer.20.x64.dll. It will be inside the bin folder located at the DynamicPDF Viewer installed location.
To reference our assembly from Visual Studio 2008 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.35.x64.dll. It will be inside the bin folder located at the DynamicPDF Viewer installed location.
To reference our assembly from Visual Studio 2010, Visual Studio 2012, Visual Studio 2013 and Visual Studio 2015 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%\ceTe Software\DynamicPDF Viewer v1.x.x for .NET\bin”.
For 64-bit machines: “%ProgramFiles(x86)%\ceTe Software\DynamicPDF Viewer v1.x.x 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 intelli-sense and do not need to be distributed with your product.
Visual Studio Designer and PdfViewer Control 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.



