Portable XFA runtime

The native TXFAWidgetRuntime data, layout and event model runs with Delphi or FPC on Windows and with FPC on Linux x86-64

Linux core execution does not require LCL, a desktop session or a Windows compatibility layer; the Windows FPC build retains its existing Lazarus UTF-8 RTL initialisation

Native JavaScript bridge

bash tools/Build-HotPDFQuickJSLinux.sh /var/tmp/hotpdf-native
export HOTPDF_QUICKJS_DLL=/var/tmp/hotpdf-native/libhpdfquickjs.so
export HOTPDF_SUPPRESS_AUTO_LAUNCH=1

The Linux bridge builds from the bundled QuickJS sources with GCC-compatible compilation and uses the same versioned HPDFQJS ABI as the Windows DLL

QuickJSDLLPath and HOTPDF_QUICKJS_DLL accept an explicit shared-library path on Linux; the existing API names are kept for source compatibility

Default discovery looks for libhpdfquickjs.so next to the executable and Lib/thirdparty/QuickJS/bin/Linux64 in executable ancestor directories

Each session owns a reference to its exact loaded module until its native engine, contexts and callbacks have been released; sessions keep independent script state and journals

Native monotonic clocks enforce the existing event, XML and layout budgets; deterministic epoch values, random responses and external transport responses stay recorded and replayed transactionally

Linux locales

The native Linux locale backend reads system ICU calendar names, decimal and grouping symbols, currency symbols and codes, AM/PM markers and number/date/time patterns

Named locales use fully parsed BCP47 identifiers and known ICU language data; underscore separators are canonicalised, and unsupported languages or malformed identifiers return False

An empty name selects ICU's configured default locale; document localeSet definitions and explicit application locale providers keep their existing priority

Both libicuuc and libicui18n are required; the loader resolves matching ICU export versions, including versioned runtime libraries without development symlinks

ICU and Windows may provide different regional patterns and whitespace based on their installed locale data; explicit document locale definitions can pick deterministic application formatting

Persistence and PDF consumers

SaveToBytes persists the native XDP, including Data DOM imports, per-instance values, namespace mappings, comments and processing instructions, with the same rollback behaviour on both platforms

A Linux saved-XDP consumer fixture reloads TXFAWidgetRuntime and applies its actual values through THPDFHeadlessDocument field setters and native appearance generation

That consumer uses an independently prepared PDF field template; automatic Linux XFA-to-PDF field creation and complete interactive rendering are still separate integration work