lmpdf

lmpdf is a self-contained Rust and Typst lmcode host that generates deterministic, tagged PDF/A-2b and PDF/UA-1 documents and slide decks. It accepts the exact same typed calls as lmoffice docx and lmoffice pptx with bundled Latin, Arabic RTL, and CJK fonts.

Quick reference

npm install -g @lmctl-ai/lmctl
lmpdf --version
lmpdf docx --lmcode-schema --json
lmpdf inspect hello.pdf
Route or commandKey methods or flagsPurpose
lmpdf docxdocx.create(path), heading, paragraph, table, footer_fields, markdown, html_doc, saveRender paginated, tagged PDF/A-2b and PDF/UA-1 documents from typed docx calls, Markdown, or html-doc@1 XHTML/CSS.
lmpdf pptxpptx.create(path), slide, title_slide, text, bullet, table, bar_chart, markdown, saveRender 16:9 presentation slide decks (1280x720 px / 960x540 pt) to tagged PDF/A-2b and PDF/UA-1.
lmpdf inspectlmpdf inspect FILE.pdfInspect a PDF and return a JSON summary with page, image, table, and hyperlink counts plus extracted text.
lmpdf docx --to-markdownlmpdf docx --to-markdown FILE.pdfExtract Markdown content from a generated PDF file.
output = ARGV.len() > 0 ? ARGV[0] : "hello.pdf";
p = _lmcode_ cli="lmpdf docx" install="github:lmctl-ai/lmpdf@v0.2.19";
let doc = docx.create(${output});
doc.heading("Hello PDF", 1);
doc.paragraph("The same document calls can target lmoffice docx or lmpdf docx.");
doc.footer_fields("Page {PAGE} of {NUMPAGES}").save();
end _lmcode_
r = run_lmcode(p);
assert(r.ok, json_stringify(r));

Documentation pages

Source repository and releases