Installation | |
There are 2 ways to install SelectPdf library:
Using a NuGet package (.NET Framework, .NET Core, .NET 5 - .NET 10)
Downloading assemblies (.NET Framework)
The easiest way to install SelectPdf is by using NuGet. A typical installation is three steps:
Install exactly one main library package - chosen by target framework and bitness (AnyCPU or x64).
Optionally install one engine companion package (Blink or Chromium) that matches the main package. Skip this step if the default WebKit engine is used.
Optionally install the Select.Pdf.Extras add-on if its features are needed (new PDF forms filling engine, PDF compressor).
1. Main library packages (install one)
Modern .NET, AnyCPU - .NET Framework 4.6.1 / 4.7.2, .NET Core 2.0+ through .NET Standard 2.0, .NET 5 - .NET 10.
Modern .NET, x64 - same targets as Select.Pdf.NetCore, x64 optimized.
Legacy .NET Framework 2.0 - 4.5, AnyCPU.
Legacy .NET Framework 2.0 - 4.5, x64 optimized.
2. Engine companion packages (optional; install alongside the matching main package - see Rendering Engines)
Blink - modern .NET only (net461+ / .NET Core / .NET 5 - .NET 10):
Companion for Select.Pdf.NetCore (AnyCPU).
Companion for Select.Pdf.NetCore.x64 (x64).
https://www.nuget.org/packages/Select.Pdf.NetCore.Blink.x64/
Chromium (CEF) - available for every .NET target supported by SelectPdf (see Chromium Engine):
Companion for Select.Pdf.NetCore (AnyCPU).
https://www.nuget.org/packages/Select.Pdf.NetCore.Chromium.Windows/
Companion for Select.Pdf.NetCore.x64 (x64).
https://www.nuget.org/packages/Select.Pdf.NetCore.Chromium.Windows.x64/
Companion for Select.Pdf (AnyCPU).
Companion for Select.Pdf.x64 (x64).
https://www.nuget.org/packages/Select.Pdf.Chromium.Windows.x64/
3. Extras add-on (optional) - contains features that are not in the main library (new PDF forms filling engine, PDF compressor).
.NET Framework 4.0+, .NET Core / .NET 5 - .NET 10, AnyCPU.
.NET Framework 4.0+, .NET Core / .NET 5 - .NET 10, x64 optimized.
If an x64 package is used, the application must target x64 and run in an x64 worker process.
The .NetCore packages cover .NET Framework 4.6.1 / 4.7.2, .NET Core 2.0+ through .NET Standard 2.0, and modern .NET 5 through .NET 10. They currently require Windows; they do not run on Linux, macOS or Xamarin.
The Blink engine was introduced in SelectPdf v19.1 and requires modern .NET (net461+ or .NET Core 2.0+). The Chromium engine was introduced in SelectPdf v26.2 and is available for every .NET target SelectPdf supports.
SelectPdf can be downloaded from the product site: https://selectpdf.com. The free trial product archive download page is this one: https://selectpdf.com/downloads/. SelectPdf is shipped as a product archive with the following structure:
Contains the assemblies and related files needed by SelectPdf Library for .NET.
Select.Pdf Library is shipped with different versions for CLR 2.0 (.NET 2.0, 3.5) and for CLR 4.0 (.NET 4.0 and above) and for .NET Core and above (.NET 5 - .NET 10).
Note: The .NET Core version and .NET Framework versions (targeting 4.6.1 or above) have additional dependencies that need to be installed via Nuget.
Contains the product documentation in CHM format.
Contains C# and VB.NET samples that show how to use most of the features the library provides.
To use SelectPdf in a .NET project, a reference needs to be added to Select.Pdf.dll. Two additional files are also required: Select.Html.dep used by the html to pdf converter and Select.Tools.dep used by the pdf to text and pdf to image converter. These files need to be copied into the bin folder of the application, next to Select.Pdf.dll. Alternatively, the path to Select.Html.dep can be specified using the HtmlEngineFullPath property of the GlobalProperties class. The path to Select.Tools.dep can be specified using the PdfToolsFullPath property of the GlobalProperties class.
Important: If any of the properties HtmlEngineFullPath or PdfToolsFullPath of the GlobalProperties class is used, do not forget to include the full file name (Select.Html.dep or Select.Tools.dep) with it.
If Blink rendering engine is needed (only works with the .NET Core version and with .NET Framework 4.6.1 or above), Blink (Chromium) binaries need to be installed. That can be done via Nuget: https://www.nuget.org/packages/Select.Pdf.NetCore.Blink/. Alternatively, Blink binaries can be downloaded from SelectPdf website: https://selectpdf.com/downloads/. In this case, the Chromium folder needs to be manually copied to the bin folder of the application.
If the Chromium rendering engine is needed, install the companion Chromium.Windows Nuget package that matches the main SelectPdf package already referenced in the project. The package deploys the Chromium runtime into the application output folder automatically at build time. See Chromium Engine for the full list of Chromium.Windows packages and for a sample of how to select the engine from code.
If SelectPdf needs to be installed into GAC, the only dll that has to to be added to GAC is Select.Pdf.dll. The related files (Select.Html.dep and Select.Tools.dep) will be automatically copied to GAC as linked resources, so no additional action is needed for them (this is only valid for the .NET Framework 2.0 and 4.0-4.5 versions).
SelectPdf Library has specific assemblies depending on the target platform. For some platforms, the library has external dependencies that need to be installed.
.NET Framework 2.0 - Newtonsoft.Json (13.0.3+).
.NET Framework 4.0-4.5 - Newtonsoft.Json (13.0.3+).
.NET Framework 4.6.1 - Newtonsoft.Json (13.0.3+), System.Buffers (4.5.1+), System.Numerics.Vectors (4.5.0+), System.Threading.Tasks.Extensions (4.5.2+).
.NET Framework 4.7.2 - Newtonsoft.Json (13.0.3+), System.Buffers (4.5.1+), System.Numerics.Vectors (4.5.0+), System.Threading.Tasks.Extensions (4.5.2+).
.NET Core 2.0 and above (through .NET Standard 2.0) - Microsoft.Win32.Registry (4.5.0+), Newtonsoft.Json (13.0.3+), System.Buffers (4.5.1+), System.Drawing.Common (4.7.3+), System.Numerics.Vectors (4.5.0+), System.Security.Cryptography.Pkcs (4.5.2+), System.Security.Permissions (4.5.0+), System.Security.Principal.Windows (4.5.1+), System.Text.Encoding.CodePages (4.5.1), System.Threading.Tasks.Extensions (4.5.2+).
Note: All external dependencies can be installed via Nuget.