Batch-convert documents to another format without opening a UI using LibreOffice headless --convert-to

domain: desktop-automation · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Launch LibreOffice in headless mode so it runs without a user interface: `soffice --headless --convert-to pdf myfile.docx`
  2. Convert a whole directory of files at once with a glob, e.g. `soffice --headless --convert-to pdf *.doc`
  3. Route output files to a specific directory instead of the current one with `--outdir`, e.g. `soffice --headless --convert-to pdf:writer_pdf_Export --outdir /home/user *.doc`
  4. Pin the exact export filter when the default guess for a target extension isn't the one you want, using the `OutputFileExtension[:OutputFilterName[:OutputFilterParams]]` syntax (e.g. `pdf:writer_pdf_Export`)
  5. Point each concurrent/automated invocation at its own profile directory with `-env:UserInstallation=file:///tmp/some-unique-path` so parallel or scripted runs don't collide on the default user profile
  6. Add `--nolockcheck` only if you intentionally run multiple soffice processes against shared state and understand the tradeoff — it disables the check for remote instances using the installation

Known gotchas

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans