Installation | |
SelectPdf Html To Pdf Converter - Community Edition is installed exclusively through NuGet. There are no assemblies to download and no engine companion packages to pick from - the HTML rendering engine ships as a per-platform NuGet package that sits next to the managed library.
A typical installation is two steps:
Install the managed library package (SelectPdf.HtmlToPdf.Universal).
Install the native engine package that matches your deployment platform (runtime identifier), for example SelectPdf.Universal.Native.win-x64.
1. Managed library package
The free Community Edition. A single AnyCPU package that targets .NET Standard 2.0, .NET 8.0 and .NET 10.0 - usable from .NET Framework 4.6.1+, .NET Core 2.0+ / .NET Standard 2.0, and .NET 5 through .NET 10. The assembly is SelectPdf.HtmlToPdf.Universal.dll. Its public types live in the SelectPdf.Universal namespace, the same as the full edition's, so it is a drop-in replacement for the full edition - only the package and DLL name differ, no code or using change is needed to switch editions.
https://www.nuget.org/packages/SelectPdf.HtmlToPdf.Universal/
2. Native engine packages (install the one that matches your deployment runtime identifier)
The Chromium (CEF) HTML rendering engine is platform specific. Install exactly the Native package(s) matching the runtime identifier(s) you deploy to. The managed library is AnyCPU. Choose the Native package that matches the architecture of the process that converts - win-x64, linux-x64, linux-arm64 or osx-arm64 for a 64-bit process, win-x86 for a 32-bit Windows process: the Chromium engine then runs inside the application. With a package of another architecture conversions run in a separate engine process; see Chromium Engine.
Native engine for 64-bit Windows.
https://www.nuget.org/packages/SelectPdf.Universal.Native.win-x64/
Native engine for 32-bit Windows.
https://www.nuget.org/packages/SelectPdf.Universal.Native.win-x86/
Native engine for 64-bit Linux (x64).
https://www.nuget.org/packages/SelectPdf.Universal.Native.linux-x64/
Native engine for 64-bit Linux (ARM64 / aarch64).
https://www.nuget.org/packages/SelectPdf.Universal.Native.linux-arm64/
Native engine for macOS on Apple Silicon (ARM64). Requires macOS 13 (Ventura) or newer.
https://www.nuget.org/packages/SelectPdf.Universal.Native.osx-arm64/
3. Fonts package (optional, for Linux)
Linux servers and container images often have no fonts. SelectPdf.Universal.Fonts adds Noto fonts for every script, so pages in any language render there; it copies nothing for Windows builds. See Fonts and Languages.
https://www.nuget.org/packages/SelectPdf.Universal.Fonts/
The Community Edition is HTML-to-PDF only and is capped at 5 pages per document.
There is only one HTML rendering engine (Chromium / CEF), bundled in the Native package. There are no engine companion packages to choose. See Chromium Engine.
To deploy to more than one platform side by side, install every matching Native package; each targets its own runtime identifier and they can coexist.
On macOS only Apple Silicon (ARM64) is supported. No osx-x64 engine package is produced, so HTML-to-PDF is unavailable on Intel Macs.
Before SelectPdf.HtmlToPdf.Universal, the free Community Edition shipped as Select.HtmlToPdf: a Windows-only converter for .NET Framework and .NET, distributed as NuGet packages and as downloadable archives. SelectPdf.HtmlToPdf.Universal is a separate product line with its own package ids, assembly name and namespace. NuGet does not treat it as an update of Select.HtmlToPdf, so an existing project keeps the previous converter until its references are replaced. To move a project, remove the pieces listed below, install the packages described above, and follow Migrating to SelectPdf.HtmlToPdf.Universal for the code changes.
Previous NuGet packages and their replacements
Previous package | What it contained | Replace with |
|---|---|---|
Select.HtmlToPdf | The converter for .NET Framework 2.0 and 4.0 (Select.HtmlToPdf.dll) with its WebKit HTML engine (Select.Html.dep). | SelectPdf.HtmlToPdf.Universal plus one SelectPdf.Universal.Native.<rid> package. .NET Framework is supported from version 4.6.1, through the .NET Standard 2.0 build; .NET Framework 2.0 to 4.5 are not. |
Select.HtmlToPdf.NetCore | The same converter for .NET Framework 4.6.1 and later, .NET Core and .NET (.NET Standard 2.0), on Windows only. | SelectPdf.HtmlToPdf.Universal plus one SelectPdf.Universal.Native.<rid> package. |
Select.HtmlToPdf.Chromium.Windows, Select.HtmlToPdf.NetCore.Chromium.Windows | The engine folder (Chromium-CEF-<version>) of the Chromium rendering engine. | Nothing separate: the Chromium engine is in the SelectPdf.Universal.Native.<rid> package. |
Select.HtmlToPdf.NetCore.Blink | A Chrome build (Chromium-<version> folder) for the Blink rendering engine. | Nothing: SelectPdf.HtmlToPdf.Universal has one rendering engine, Chromium. The Blink, WebKit and WebKit Restricted engines are not available. |
Previous download archives
The Community Edition was also offered as zip archives from the SelectPdf website: SelectPdf-HtmlToPdf-Assemblies-v<version>.zip (the assemblies for each .NET Framework version, the documentation and the samples) and SelectPdf-HtmlToPdf-Samples-v<version>.zip, with the Chromium and Blink engine folders in separate archives. A project set up from an archive references the DLL directly and carries its engine files by hand. SelectPdf.HtmlToPdf.Universal has no archive distribution: it is installed through NuGet only.
What to remove from a project that used the previous converter
The package references listed in the table above, and Newtonsoft.Json if it was added only for SelectPdf.
Direct references to Select.HtmlToPdf.dll, usually with a hint path into the Assemblies folder of an archive.
The engine files deployed next to the application, whether they were added to the project as content or copied by hand: Select.Html.dep, the Chromium engine folder (Chromium-CEF-<version>) and the Blink engine folder (Chromium-<version>). Clean the output folders as well, where copies can remain after the references are gone.
Build steps that copied the engine files: projects that use packages.config often carry an AfterBuild target (named CopyChromiumFiles in the SelectPdf samples) that copies the Chromium folder into the output. The new native packages deploy their files themselves.
On machines where Select.HtmlToPdf was installed in the Global Assembly Cache, remove it from the GAC once no application uses it.
The new assembly is named SelectPdf.HtmlToPdf.Universal.dll, and the engine files are the Chromium-CEF-154.0.28 folder (and the PDF tool, SelectPdf.Tools.dep or SelectPdf.Tools, which only the full library uses). SelectPdf.HtmlToPdf.Universal loads nothing from the previous converter, so leftover files do not affect it, but they add to the size of every deployment.