Windows on ARM
PDFlibPas supports Windows 11 on ARM through native Free Pascal ARM64 and Delphi ARM64EC source builds, using the existing TPDFlib API
| Compiler | Target | Application and DLL compatibility |
|---|---|---|
| Free Pascal 3.3.1 with matching ARM64 RTL and packages | aarch64-win64 | Native ARM64 Windows applications and ARM64 DLLs |
| Delphi with the Windows ARM64EC compiler and RTL installed | WinARM64EC | ARM64EC applications and DLLs using the x64-compatible ABI on Windows 11 on ARM |
ARM64 and ARM64EC have different binary interfaces and dependency requirements; use a compiler, RTL and DLL set that match the selected target
Free Pascal builds
Select a compiler whose -iTP output is aarch64 and whose -iTO output is win64
set FPC=C:\Toolchains\FPC\bin\aarch64-win64\fpc.exe
build-Lazarus-Lib.cmd winarm64
build-Lazarus-DLL.cmd winarm64
Library units are written to Lib\FPC\aarch64-win64; the full DLL is written to DLL\FPC\aarch64-win64\Release\PDFlibDLL-aarch64-win64.dll
Pass debug for a debug build; build-Lazarus-Lib-TRIAL.cmd winarm64 builds trial library units
The runtime package Lib\FPC\PDFlibPasLaz.lpk also builds with a native ARM64 Lazarus/FPC installation; its optimisation level matches the command-line library builds
Keep the compiler configuration and package paths consistent with the target, and do not add -FcUTF8, which can corrupt binary AnsiString data in PDF identifiers and encryption values
Delphi ARM64EC builds
The build requires bin64\dccarm64ec.exe and the lib\winarm64ec\release RTL, including librtlhelper.a; RAD Studio 37.0 with the ARM64EC toolchain is qualified
build-WinARM64EC-Lib.cmd -BDSRoot "C:\Program Files (x86)\Embarcadero\Studio\37.0"
DLL\build-WinARM64EC.cmd -BDSRoot "C:\Program Files (x86)\Embarcadero\Studio\37.0"
The scripts also discover RAD Studio through BDS or the installation registry; use -Version when selecting a different registered installation
Library units are written to Lib\37.0\WinARM64EC\Release, and the DLL is written to DLL\WinARM64EC\Release\PDFlibDLLARM64EC.dll
Pass -Debug or -Trial for separate debug or trial output directories; the corresponding -TRIAL.cmd entry points select trial builds automatically
The output validation checks ARM64EC CHPE metadata, because an ARM64EC PE image uses an AMD64 machine field; the machine field alone cannot distinguish it from an ordinary x64 build
Runtime providers
| Capability | Windows ARM provider | Deployment |
|---|---|---|
| AES CBC and GCM | Windows CNG | System bcrypt.dll |
| JPEG | Windows GDI+ | System gdiplus.dll |
| Compression | FPC Pascal implementation or Delphi System.ZLib | Linked through the selected compiler route |
| XMP | Windows MSXML; Delphi ARM64EC uses typed COM interfaces and bounded SAX preflight | System MSXML 6 for Delphi ARM64EC |
| JPEG 2000 | OpenJPEG 2 shared library | Deploy openjp2.dll for the application's ABI |
| JBIG2 encoding | Pascal MMR encoder | The Intel external encoder object set is excluded |
Use a native ARM64 OpenJPEG DLL for FPC applications; Delphi ARM64EC applications can use an x64-compatible OpenJPEG DLL, with Windows providing emulation for the x64 dependency
Lib\thirdparty\Build-OpenJPEGWindowsARM.ps1 builds OpenJPEG 2.5.4 from an upstream source tree using the matching LLVM-MinGW Clang driver
powershell.exe -NoProfile -ExecutionPolicy Bypass -File Lib\thirdparty\Build-OpenJPEGWindowsARM.ps1 -Architecture ARM64 -Clang "C:\Toolchains\llvm-mingw\bin\aarch64-w64-mingw32-clang.exe" -SourceRoot "C:\Sources\openjpeg-2.5.4" -OutputDirectory "C:\MyApp\ARM64"
For an x64 OpenJPEG DLL, select -Architecture x64 and the x86_64-w64-mingw32-clang.exe driver
OpenJPEG is loaded when its codec is requested; a missing or incompatible provider reports an explicit error and does not prevent unrelated PDF workflows from starting
Optional PDFium, Cairo, OCR, barcode and other native extensions also require DLLs compatible with the application ABI
DLL use and verification
Resolve Windows DLL entry points by name with GetProcAddress; the Windows ARM DLL exposes the existing named export surface, UTF-16 strings, 32-bit opaque instance handles and 64-bit pointers for buffers
Keep handles as signed 32-bit integers, keep data pointers at the process pointer size, and release buffers and instances before unloading the DLL
The qualified console workflows cover PDF creation, saving/loading, text extraction, encryption, XMP, Windows bitmap/JPEG rendering, JPEG 2000 encoding and DLL calls across the exported ABI
GUI, printer, hardware integration and optional third-party providers require application-specific validation; the test suite is available on request to enterprise licence purchasers
For Linux and macOS targets, see Native Linux and macOS