Convert HTML to PDF in Azure App Service, Azure Functions and containers
EvoPdf Next renders HTML to PDF inside your Azure application. Windows or Linux App Service, Azure Functions, Container Apps and AKS, with nothing to install and no server to run. Applications built on the Classic library can convert through an EVO PDF Server hosted on an Azure Virtual Machine or Cloud Service, using the .NET client.
Version 14.60.1. Building EVO PDF libraries since 2010. Evaluate without registration; the demo output is watermarked until you set a license key. Perpetual licenses from 450 USD, or 1200 with redistribution and unlimited servers. Developers are never counted.
Azure guides in the docs · Samples and demos on GitHub · AI agent skills
dotnet add package EvoPdf.Next.HtmlToPdf.Windows
App Service on Windows; for App Service on Linux and Linux containers reference EvoPdf.Next.HtmlToPdf.Linux; the code is identical
using EvoPdf.Next; // runs inside the App Service worker, no server needed var converter = new HtmlToPdfConverter(); byte[] pdf = converter.ConvertUrl(url); return File(pdf, "application/pdf", "page.pdf");
- Azure App Service, Windows and Linux
- Azure Functions, Windows and Linux
- Container Apps, AKS, any Docker host
- Virtual Machines and Cloud Services
- .NET 6–10 and .NET Framework 4.6.2+
The same package on both App Service flavours
The rendering engine is a Chromium build integrated with the library, light enough for the App Service sandbox on either platform. Reference the package for your platform, publish and convert: Windows or Linux, App Service or Functions. HTML to PDF is the component that asks for CPU and memory, so B1 is the smallest plan on Windows, B2 is the one to develop on and a Premium plan such as P1v3 is the one for production.
Windows App Service
Reference EvoPdf.Next.Windows, publish, convert. The 64-bit worker needs no configuration, no startup command and nothing installed on the instance.
- B1 for low volume, B2 for development, P1v3 or higher in production
- Free and Shared plans are not suitable for the converter
Linux App Service
The same code and the same API with EvoPdf.Next.Linux. The HTML to PDF component needs four system libraries; App Service does not keep installed packages after a restart, so they are installed on every start, from the Startup Command in the Azure Portal or from your own code. The other components need nothing extra.
- F1 is the minimum supported tier, B2 for development, P1v3 or higher in production
Publish and run on App Service
Windows App Service needs no configuration beyond the NuGet package. On Linux App Service the four system libraries of the HTML to PDF component are installed at every start, because the platform does not persist installed packages after a restart.
Windows
Reference EvoPdf.Next.Windows (or a single component such as EvoPdf.Next.HtmlToPdf.Windows), publish, done. Plans: B1 for low volume, B2 for development, P1v3 or higher for production; the Free and Shared tiers are not suitable for conversions.
Linux
Reference EvoPdf.Next.Linux and publish. Then, in the Azure Portal, open your App Service, go to Settings › Configuration › Stack settings and put the package installation in front of the existing Startup Command, on the same line. Save, then restart the app from the Overview page; the first start takes a few minutes while the packages install.
# one line, before the dotnet command
apt update && apt install -y libnss3 libatk-bridge2.0-0 libcairo2 libpango-1.0-0 && dotnet MyApp.dll
Alternative in code, before the first conversion: Installation.ConfigureRuntime(false, null, "apt update && apt install -y libnss3 libatk-bridge2.0-0 libcairo2 libpango-1.0-0");
HTML to PDF in an Azure Function
Pick the App Service or Premium plan type in the publish wizard; the Consumption plan is not suitable for the converter; on Windows it is not offered at all. On Windows nothing else is needed. On Linux the file system is read-only outside /tmp and the published runtime files carry no execute permission, so the library copies them to a writable location and installs the system packages itself; publish with Portable as the target runtime and use B2 or higher.
// once, before the first conversion; later calls are ignored Installation.ConfigureRuntime(true, null, "apt update && apt install -y libnss3 libatk-bridge2.0-0 libcairo2 libpango-1.0-0"); // PDF to text, search, images (PDF Processor component) PdfProcessorInstallation.ConfigureRuntime(true, null);
Containers on Azure
Any Azure service that runs a container runs EvoPdf Next: Container Apps, Kubernetes Service, App Service for Containers, Container Instances. Build the image from the Dockerfiles in the documentation: Debian or Ubuntu with the ASP.NET Core runtime and the four system packages, or a Windows Server image with the runtime installed.
HTML to PDF in Azure: common questions
Which App Service plan does the converter need?
On Windows the smallest supported plan is B1; the Free and Shared tiers are not suitable. On Linux the Free F1 tier is the minimum supported one, enough for testing or low volume. For development we recommend B2 on either platform; for production a Premium plan such as P1v3.
Can I use the Consumption plan for Azure Functions?
No, the Consumption plan does not have the resources for the rendering engine. Use an App Service plan or a Premium plan; on Linux the minimum is B2. The target runtime is Portable.
Do I need to install anything on the Azure host?
On Windows, nothing. On Linux App Service and Functions, four system packages (NSS, AT-SPI2/ATK bridge, Cairo, Pango) installed at startup through the Startup Command or Installation.ConfigureRuntime.
Does the Classic library run in App Service?
The Classic rendering engine does not run inside App Service; Classic applications convert through an EVO PDF Server on a Virtual Machine or Cloud Service using the .NET client. Moving to EvoPdf Next removes the server: see the migration guide.
How is it licensed in Azure?
An application running on several instances (autoscaling, load balancing, containers) needs a Company License; a single instance is covered by a Deployment License. Pricing & licensing.
Download the demo application
The ASP.NET Core demo with complete C# source, ready to publish to App Service or to build as a container; the library comes from NuGet.