Click or drag to resize
Pdf Library for .NET

Deployment

To deploy a project using Select.Pdf HtmlToPdf Converter, simply include Select.HtmlToPdf.dll and Select.Html.dep along with your project. There are no additional setups or configurations needed either on your server or your client's machine.

Select.Html.dep needs to be deployed in the same folder with Select.HtmlToPdf.dll. Alternatively, the path to Select.Html.dep can be specified using the HtmlEngineFullPath property of the GlobalProperties class.

If Blink rendering engine is used (only works with the .NET Core version and with .NET Framework 4.6.1 or above), Blink binaries (full Chromium folder) also need to be deployed.

If the Chromium rendering engine is used, the Chromium runtime folder installed by the matching Chromium.Windows Nuget package must also be deployed alongside the application. When the project references the Chromium.Windows package, MSBuild places that folder in the application output directory automatically at build time, so a standard publish operation picks it up. See Chromium Engine for details.

Important note  Important

Full trust is required on the deployment machine. SelectPdf.Pdf makes numerous native API calls, thus it requires full trust to run.

GAC Installation

If you plan to install Select.Pdf into GAC, the only dll that needs to be added to GAC is Select.HtmlToPdf.dll. The related file (Select.Html.dep) will be automatically copied to GAC as a linked resource, so no additional action is needed for it.

Deployment to a Shared Hosting Environment

If you plan to deploy Select.Pdf Html To Pdf Converter to a shared hosting environment, please check with your hosting company whether they support full trust. SelectPdf.Pdf makes numerous native API calls, thus it requires full trust to run. If your hosting company cannot grant full trust to your site, you may need to consider moving your site to a dedicated or virtual server.

Deployment to Windows Azure

If you plan to deploy Select.Pdf Html To Pdf Converter to Windows Azure, make sure you deploy to a Cloud Service or a Virtual Machine. Due to some security restrictions, Select.Pdf does not support Windows Azure WebSite execution mode. To resolve the issue, you can either deploy your site to a Cloud Service or a Virtual Machine, or isolate the PDF related feature into a separate Web Service that runs on a different server (either on a Windows Azure Cloud Service/Virtual Machine, or a dedicated server hosted elsewhere), then call the web service from your Windows Azure WebSite.

Update: Starting with version 18.3, SelectPdf supports Microsoft Azure Web Apps (Basic plan or above). More details here: Deployment to Microsoft Azure.

Update: Starting with version 26.2, Select.HtmlToPdf also supports Microsoft Azure Web Apps (Basic plan or above) using the Chromium rendering engine, with the full feature set. See Chromium Engine for how to install and select the Chromium engine, and Deployment to Microsoft Azure for the full Azure deployment discussion.

Cross-Platform and Docker Deployment

Select.HtmlToPdf and its rendering engines run on Windows only. For Linux servers, macOS and Docker containers, use SelectPdf.HtmlToPdf.Universal - the free cross-platform Community Edition. It keeps the classes and members of this library; porting existing code means new package references, the SelectPdf.Universal namespace instead of SelectPdf, and SelectPdf's own drawing types instead of System.Drawing. See Cross-Platform Library for the full feature list, the NuGet packages, platform support, and migration notes, and Migrating to SelectPdf.HtmlToPdf.Universal for every code change.

A cross-platform deployment is the managed SelectPdf.HtmlToPdf.Universal package plus one native engine package for the target platform - SelectPdf.Universal.Native.win-x64, win-x86, linux-x64, linux-arm64 or osx-arm64. MSBuild places the engine files in the output directory at build time, so a standard publish picks them up, and several native packages can be referenced side by side when the same application is published for more than one platform.

  • Linux (x64 / arm64) - nothing has to be installed on the server. The native package ships the rendering engine together with the libraries it needs, rendering is headless (no X server), and fallback fonts are bundled, so even a minimal server image works. The library also restores the engine's execute permission itself, which a ZIP deployment produced on Windows does not preserve.

  • macOS (Apple Silicon, macOS 12 or newer) - the engines link only macOS system frameworks, so there is nothing to install beyond the application and the .NET runtime.

  • Containers - Linux and Windows containers are both supported; see Deployment to Docker for base images, resources and example Dockerfiles.

  • Azure Linux plans, Container Apps and AKS - see Deployment to Microsoft Azure.

See Also