Click or drag to resize

Deployment: Windows, Linux, macOS, Docker and the Cloud

An application that uses ExpertPdf Anywhere is deployed like any other .NET application: publish it and copy the publish folder. The native packages place the Chromium engine (the Chromium-CEF-154.0.28 folder) and the PDF tool (ExpertPdf.Tools) in the output, and the library finds them there. Nothing is installed or registered on the server.

Windows, IIS and Azure App Service
  • Reference ExpertPdf.Anywhere.Windows (or the library and ExpertPdf.Anywhere.Native.win-x64, or .win-x86 for a 32-bit process).

  • IIS and Azure App Service: a 32-bit worker process works with the x64 engine package; the engine then runs in a separate process. Choose a 64-bit worker to run it inside the application.

  • Azure App Service: Basic plan or above. Deploy with Zip Deploy or Web Deploy, which extract the files; with WEBSITE_RUN_FROM_PACKAGE the engine cannot start from the mounted package, so leave that setting off.

  • Windows Server Core containers: see the Docker section below.

Linux
  • Reference ExpertPdf.Anywhere.Linux (x64) or ExpertPdf.Anywhere.Linux.Arm64, or the library and the matching native package, and publish for the runtime: dotnet publish -r linux-x64.

  • No system package is needed: the native package brings the Chromium shared libraries, and the engine renders headless, without an X server.

  • The engine files arrive executable; if a copy lost the permission (for example a zip made on Windows), the library restores it before it starts the engine.

  • Hosts without fonts (container images, AWS Lambda, Azure App Service on Linux): add ExpertPdf.Anywhere.Fonts.

Docker

Linux containers run on the standard glibc-based .NET images (mcr.microsoft.com/dotnet/aspnet, mcr.microsoft.com/dotnet/runtime) with nothing installed in the image: no apt-get, no special docker run options, no GPU and no --shm-size. A minimal multi-stage Dockerfile:

FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src
COPY . .
RUN dotnet publish MyApp.csproj -c Release -r linux-x64 --self-contained false \
    -o /app

FROM mcr.microsoft.com/dotnet/aspnet:10.0
WORKDIR /app
COPY --from=build /app .
USER app
ENV ASPNETCORE_URLS=http://+:8080
EXPOSE 8080
ENTRYPOINT ["dotnet", "MyApp.dll"]
  • The image can run as a non-root user (the app user above): the native package makes the engine readable and executable for every user when the application is published on Linux.

  • ARM64 images: reference the linux-arm64 package and publish with -r linux-arm64. On an Apple Silicon Mac, Docker runs Linux ARM64 containers, so an image needs the linux-arm64 package, not osx-arm64.

  • Alpine (musl) images are not supported.

  • Plan for at least 1 CPU core and 2 GB of memory per container; 2 cores for steady conversion times under load.

Windows containers: base the image on Windows Server Core (for example mcr.microsoft.com/dotnet/aspnet:10.0-windowsservercore-ltsc2022); Nano Server is not supported. Server Core ships almost no fonts and the engine needs the standard Windows font families (Segoe UI, Arial, Times New Roman...): copy them from the mcr.microsoft.com/windows/server image in a build stage and register them, or base the image on that full Windows Server image.

macOS

Reference ExpertPdf.Anywhere.MacOS (or the library and ExpertPdf.Anywhere.Native.osx-arm64) for applications that run on macOS 13 or later on Apple Silicon. For Docker on a Mac, see the Docker section: containers are Linux.

Serverless and cloud services
  • AWS Lambda: deploy as a container image (the engine makes the package too large for a zip deployment) based on public.ecr.aws/lambda/dotnet, with ExpertPdf.Anywhere.Fonts. A Lambda response is limited to 6 MB: return large documents through Amazon S3.

  • Azure Functions: a Dedicated (App Service) plan, Windows or Linux. The Consumption plans cannot run the engine.

  • Container services (Azure Container Apps, Amazon ECS, Google Cloud Run, Kubernetes): use the Docker image above.

See Also