IronPDF on Windows Server Core Containers

IronPDF needs system fonts to render content correctly. Windows Server Core 2019 and 2022 ship with almost nothing, mainly just Lucon, which isn't enough for proper PDF output. The fix is to install the fonts you need, such as Arial, directly in the container image.

Solution

Add the font to the system fonts directory and register it so the renderer can find it. The Dockerfile below copies arial.ttf into place and writes the matching registry entry:

FROM mcr.microsoft.com/dotnet/sdk:8.0-windowsservercore-ltsc2022 as base
USER ContainerAdministrator
WORKDIR C:/

COPY arial.ttf c:/windows/fonts/arial.ttf
RUN powershell.exe -NoProfile -Command New-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts' -Name 'Arial (TrueType)' -PropertyType String -Value arial.ttf

Each line earns its place:

  • USER ContainerAdministrator: grants the permission needed to modify the system registry and install fonts.
  • COPY arial.ttf c:/windows/fonts/arial.ttf: places the Arial font file into the system fonts directory.
  • New-ItemProperty: registers Arial so the system recognizes it and can use it during PDF rendering.

Repeat the COPY and RUN pair for any other typeface your documents rely on.

CautionThis does not work with Windows Server Nano containers. Nano Server is a trimmed-down image that lacks key font rendering libraries and does not support font installation, so IronPDF cannot run on it.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 19,680,294 | Version: 2026.7 just released
Still Scrolling Icon

Still Scrolling?

Want proof fast? PM > Install-Package IronPdf
run a sample watch your HTML become a PDF.