How to run IronPdf on Windows Server Core Container
Windows Server Core 2019/2022 Containers only include the Lucon font by default, which isn’t enough for IronPdf. To render PDFs correctly, you need to manually install fonts like Arial.
IronPdf requires certain system fonts to properly render content when generating PDFs. Windows Server Core 2019 and 2022 come with only a few built-in fonts, mainly just Lucon. This limited font support makes IronPdf incompatible by default.
Error message
In this scenario, the renderer deploys and initializes normally — the log records Cef initialization succeeded and WebKit initialized — and then the host process terminates while it is processing the render job:
[0721/172549.794:ERROR:gpu_channel_manager.cc(884)] Failed to create GLES3 context, fallback to GLES2.
[0721/172549.794:ERROR:gpu_channel_manager.cc(895)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0721/172549.794:ERROR:shared_image_stub.cc(439)] SharedImageStub: unable to create context
[0721/172549.794:ERROR:gpu_channel.cc(589)] GpuChannel: Failed to create SharedImageStub
17:25:49 (21884): WebKit initialized
Command failed with exit code -1073741571
The process exits with code -1073741571, which is 0xC00000FD — STATUS_STACK_OVERFLOW — and a full Windows Error Reporting crash dump (dumps\dotnet.exe.<pid>.dmp) is written at the time of the crash. The gpu_channel / SharedImageStub messages above are non-fatal GPU-virtualization warnings (the GPU is already disabled in headless/container mode) and are not the cause of the crash. The complete deployment and renderer output is written to ironpdf.log.
To make IronPdf work in a Server Core container, you must install additional fonts like Arial. Below is a sample Dockerfile that shows how to copy and register the Arial font:
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
Explanation of the Dockerfile commands:
-
USER ContainerAdministrator: Grants permission to modify the system registry and install fonts. -
COPY arial.ttf c:/windows/fonts/arial.ttf: Copies the Arial font file into the system fonts directory. -
New-ItemProperty: Adds a new registry entry for the Arial font so that the system recognizes and can use it during PDF rendering.
Note: This solution does not work with Windows Server Nano containers. Nano Server is a highly trimmed-down version of Windows that lacks key font rendering libraries and does not support font installation, making it incompatible with IronPdf.