Skip to main content

Can I Run HTML to PDF on Azure?

Can I Run HTML to PDF on Azure?Photo by Javier Quesada

Originally Posted On: https://ironpdf.com/docs/questions/azure/

 

Yes. IronPDF can use used to generate, manipulate, and read PDF documents on Azure.

IronPDF has been thoroughly tested on multiple Azure platforms including MVC websites, Azure Functions, and many more.

Performance and Azure Tiers

We recommend that Azure B1 hosting levels are very suitable for our end users’ rendering needs. If they are creating a high throughput system, this may need to be upgraded.

Framework Choice

We have found that IronPDF for Core and for Framework both work on Azure. .NET Standard applications seem to have a small performance advantage on speed and stability, but use more memory in process.

Known IssuesSVG fonts rendering is not available on shared hosting plans

One limitation we have found is that the Azure hosting platform does not support servers loading SVG fonts, such as Google Fonts, in their cheaper shared web-app tiers. This is because these shared hosting platforms are not allowed to access windows GDI+ graphics objects for security reasons.

We recommend using a Windows or Linux Docker Container or perhaps a VPS on Azure to navigate this issue where the best font rendering is required.

Azure free tier hosting is slow

Azure free tiers are generally not suitable for performance testing and may present with issues or long waits. We recommend Azure B1 hosting, which is what we use ourselves.

Html to PDF is significant ‘work’ for any computer – similar to opening and rendering a web page on your own machine. A real browser engine is used, hence we need to provision accordingly and expect similar render times to a desktop machine of similar power.

Docker on Azure

One way to gain control, SVG font access, and the ability to control performance on Azure is to use IronPDF applications and Functions from within Docker Containers.

We have a comprehensive IronPDF Azure docker tutorial for Linux and Windows instances and it is recommended reading.
 These excerpts may help you get started.

Example DockerFile for Linux

This is an example windows container DockerFile for .NET Standard (2.0+) and .NET 4.0+ applications.

# escape=` FROM mcr.microsoft.com/dotnet/core/runtime:3.1 # Mount folder for an application VOLUME /app WORKDIR /app

Example DockerFile for Windows

This is an example Windows container Dockerfile for .NET Standard (2.0 to 3.1+ as of March 2020) and .NET 4.0+ applications.

# escape=` FROM mcr.microsoft.com/windows/servercore:ltsc2019 # Create folder for .NET Core installer WORKDIR /dotnet-install # Download .NET Core installer ADD https://download.visualstudio.microsoft.com/download/pr/ff658e5a-c017-4a63-9ffe-e53865963848/15875eef1f0b8e25974846e4a4518135/dotnet-hosting-3.1.3-win.exe dotnet-installer.exe # Execute .NET Core installer USER ContainerAdministrator RUN dotnet-installer.exe /install /quiet /norestart /log dotnet-install.log || exit 0 # Print installation log to the Console USER ContainerUser RUN type dotnet-install.log # Mount application folder VOLUME c:app

Data & News supplied by www.cloudquote.io
Stock quotes supplied by Barchart
Quotes delayed at least 20 minutes.
By accessing this page, you agree to the following
Privacy Policy and Terms and Conditions.