lmpdf guide

Typst layout architecture, lmoffice schema parity, PDF/A-2b and PDF/UA-1 archival conformance, dry validation, and the standard lmcode_std_v3 library for lmpdf.

Overview

lmpdf is a self-contained Rust host built on the lmcode-rust SDK and an embedded Typst layout engine. It implements the same docx and pptx schemas as lmoffice, allowing one LMScript program to produce either an editable Open XML package or a deterministic, tagged PDF/A-2b and PDF/UA-1 document or presentation deck simply by switching the host command from lmoffice to lmpdf.

One script, two outputs: lmoffice parity

lmpdf exposes two subcommands that mirror lmoffice's document and presentation routes:

Archival PDF/A-2b, accessible PDF/UA-1, and bundled fonts

Invocation manifest, builder parts, and dry validation

When LMScript runs a program via run_lmcode(p), it passes an invocation manifest v1 through LMCODE_INVOCATION_FILE:

Standard lmcode_std_v3 library

Both lmpdf docx and lmpdf pptx include the standard lmcode_std_v3 catalog (--lmcode-signatures --without-std omits the standard catalog when inspecting host-only signatures). The catalog provides string, encoding, math, typed collection (IntList, FloatList, StrList, IntMap, FloatMap, StrMap, stacks, queues, priority queues), JSON, template, file, and return-framing functions. The v0.2.19 release prints 206 standard signatures and does not ship the REST and CLI interfaces (RestGet, CliCommand, rest_serve and related functions).