Runs on 2026-11-26, containers on an arm64 Mac.
Images: node:lts-slim (Node v26.13.1, Debian 13). Dockerfile-libreoffice adds LibreOffice 25.2.3.2 and libreoffice-convert 1.9.1:
apt: 139 newly installed, Need to get 110 MB of archives, After this operation, 384 MB of additional disk space;
node_modules 1.2 MB. Dockerfile-puppeteer adds mammoth 1.13.0, puppeteer 25.19.0 (node_modules 41 MB) and, because
Puppeteer has no browser build for arm64 Linux, the distribution's browser package: apt 167 newly installed, 198 MB to
download, 765 MB on disk. On x86-64, Puppeteer downloads Chrome for Testing 158.0.8127.88 instead (the zip is 208,082,347
bytes; under x86-64 emulation on this Mac its install never completed, so the mammoth runs used the arm64 image).
No extra font packages in any image.

=== node bench.mjs api (our API in a local container: no internet in these times)
api quarterly-report run 1: 0.37 s
api quarterly-report run 2: 0.08 s
api quarterly-report run 3: 0.13 s
api supply-agreement-draft run 1: 0.03 s
api supply-agreement-draft run 2: 0.06 s
api supply-agreement-draft run 3: 0.03 s
api field-service-handbook run 1: 0.03 s
api field-service-handbook run 2: 0.03 s
api field-service-handbook run 3: 0.03 s
api handbook UpdateFields=true: 0.08 s
api PageRange=1-2: Error: 400 PageRange is not supported yet for DOCX → PDF (0.05 s)

=== node bench.mjs usage (the usage lines on the page)
draft-1.docx, draft-1.pdf, draft-2.docx, draft-2.pdf, draft-3.docx, draft-3.pdf
82830 45899
Error: 400 PageRange is not supported yet for DOCX → PDF

=== node bench.mjs lc (libreoffice-convert 1.9.1, called as on the page; outputs/lc)
libreoffice-convert quarterly-report run 1: 0.93 s
libreoffice-convert quarterly-report run 2: 0.68 s
libreoffice-convert supply-agreement-draft run 1: 0.57 s
libreoffice-convert supply-agreement-draft run 2: 0.58 s
libreoffice-convert field-service-handbook run 1: 0.55 s
libreoffice-convert field-service-handbook run 2: 0.59 s
    [ '91303 bytes', '37709 bytes', '51594 bytes', '91303 bytes' ]
libreoffice-convert 4 at once: 0.87 s
(node:1) [DEP0174] DeprecationWarning: Calling promisify on a function that returns a Promise is likely a mistake.
libreoffice-convert, README's promisify line: 0.65 s
libreoffice-convert timeout 200 ms: Error: Command failed: /usr/bin/libreoffice -env:UserInstallation=file:///tmp/soffice-1-xHwLeAekSJXS --headless --convert-to .pdf --outdir /tmp/libreofficeConvert_-1-oBo6fjt7dD7g /tmp/libreofficeConvert_-1-oBo6fjt7dD7g/source (0.21 s)
    [
  '91303 bytes',
  '37709 bytes',
  '51594 bytes',
  '91303 bytes',
  '37709 bytes',
  '51594 bytes',
  '91303 bytes',
  '51594 bytes'
]
libreoffice-convert 8 at once: 1.35 s

=== node bench.mjs lo (project/libreoffice.mjs: soffice with a profile per call, no package; outputs/lo)
soffice (our code) quarterly-report run 1: 0.86 s
soffice (our code) quarterly-report run 2: 0.69 s
soffice (our code) supply-agreement-draft run 1: 0.60 s
soffice (our code) supply-agreement-draft run 2: 0.58 s
soffice (our code) field-service-handbook run 1: 0.59 s
soffice (our code) field-service-handbook run 2: 0.56 s
    [ '91303 bytes', '37709 bytes', '51594 bytes', '91303 bytes' ]
soffice (our code) 4 at once: 0.79 s

=== node bench.mjs mammoth (mammoth to HTML, Puppeteer prints it on US Letter; outputs/mammoth)
puppeteer launch (defaults): Error: Failed to launch the browser process:  Code: 1 (0.08 s)
puppeteer launch --no-sandbox: 0.31 s
    mammoth messages: [
  "Unrecognised paragraph style: 'Body Text' (Style ID: BodyText)",
  "Unrecognised paragraph style: 'Table Heading' (Style ID: TableHeading)",
  "Unrecognised paragraph style: 'Table Contents' (Style ID: TableContents)"
]
mammoth+puppeteer quarterly-report: 0.15 s
    mammoth messages: [ "Unrecognised paragraph style: 'Title' (Style ID: Title)" ]
mammoth+puppeteer supply-agreement-draft: 0.06 s
    mammoth messages: [
  "Unrecognised paragraph style: 'Title' (Style ID: Title)",
  "Unrecognised paragraph style: 'TOC Heading' (Style ID: TOCHeading)",
  "Unrecognised paragraph style: 'toc 1' (Style ID: TOC1)",
  "Unrecognised paragraph style: 'toc 2' (Style ID: TOC2)"
]
mammoth+puppeteer field-service-handbook: 0.06 s

=== node bench.mjs docxpdf (docx-pdf 0.0.1; the process ended)
html-pdf: Failed to load PhantomJS module. Error: Cannot find module 'phantomjs-prebuilt'
Fatal AssertionError [ERR_ASSERTION]: html-pdf: Failed to load PhantomJS module. You have to set the path to the PhantomJS binary using 'options.phantomPath'

=== python3 compare.py out api lc lo mammoth
######## api
  quarterly-report: 3 pages, 612x792 pt; fonts ['DejaVuSans', 'LiberationSans-Bold', 'LiberationSerif', 'LiberationSerif-Bold', 'LiberationSerif-Italic']; bookmarks 5; producer 'PDF Conversion API'; 82830 bytes
    images: 1; first line: 'Q3 2026 Operations Report'
  supply-agreement-draft: 1 pages, 612x792 pt; fonts ['Caladea-Bold', 'Caladea-Regular', 'Carlito-Bold', 'Carlito-Regular']; bookmarks 3; producer 'PDF Conversion API'; 36177 bytes
    phrases: ['eighteen months', 'within 45']
  field-service-handbook: 6 pages, 612x792 pt; fonts ['Caladea-Bold', 'Caladea-Regular', 'Carlito-Regular']; bookmarks 14; producer 'PDF Conversion API'; 43134 bytes
######## lc
  quarterly-report: 3 pages, 612x792 pt; fonts ['DejaVuSans-Bold', 'DejaVuSerif', 'DejaVuSerif-Bold', 'OpenSymbol']; bookmarks 5; producer 'LibreOffice 25.2.3.2 (AARCH64) / LibreOffice Community'; 91303 bytes
    images: 3; first line: 'Q3 2026 Operations Report'
  supply-agreement-draft: 1 pages, 612x792 pt; fonts ['DejaVuSerif', 'DejaVuSerif-Bold']; bookmarks 3; producer 'LibreOffice 25.2.3.2 (AARCH64) / LibreOffice Community'; 37709 bytes
    phrases: ['The buyer may pay by check', 'twelve', 'eighteen months']
  field-service-handbook: 6 pages, 612x792 pt; fonts ['DejaVuSerif', 'DejaVuSerif-Bold']; bookmarks 14; producer 'LibreOffice 25.2.3.2 (AARCH64) / LibreOffice Community'; 51594 bytes
######## lo
  quarterly-report: 3 pages, 612x792 pt; fonts ['DejaVuSans-Bold', 'DejaVuSerif', 'DejaVuSerif-Bold', 'OpenSymbol']; bookmarks 5; producer 'LibreOffice 25.2.3.2 (AARCH64) / LibreOffice Community'; 91303 bytes
    images: 3; first line: 'Q3 2026 Operations Report'
  supply-agreement-draft: 1 pages, 612x792 pt; fonts ['DejaVuSerif', 'DejaVuSerif-Bold']; bookmarks 3; producer 'LibreOffice 25.2.3.2 (AARCH64) / LibreOffice Community'; 37709 bytes
    phrases: ['The buyer may pay by check', 'twelve', 'eighteen months']
  field-service-handbook: 6 pages, 612x792 pt; fonts ['DejaVuSerif', 'DejaVuSerif-Bold']; bookmarks 14; producer 'LibreOffice 25.2.3.2 (AARCH64) / LibreOffice Community'; 51594 bytes
######## mammoth
  quarterly-report: 2 pages, 612x792 pt; fonts ['DejaVuSans', 'DejaVuSans-Bold']; bookmarks 0; producer 'Skia/PDF m156'; 72791 bytes
    images: 1; first line: 'Q3 2026 Operations Report'
  supply-agreement-draft: 1 pages, 612x792 pt; fonts ['DejaVuSans', 'DejaVuSans-Bold']; bookmarks 0; producer 'Skia/PDF m156'; 25313 bytes
    phrases: ['eighteen months', 'within 45']
  field-service-handbook: 2 pages, 612x792 pt; fonts ['DejaVuSans', 'DejaVuSans-Bold']; bookmarks 0; producer 'Skia/PDF m156'; 35287 bytes
