deft / guides

Convert DOCX to PDF from the command line, without LibreOffice

deft doc to-pdf typesets a Word, OpenDocument or RTF file as a PDF. It needs no LibreOffice or Word: the typesetting is built into deft.

deft doc to-pdf demo.docx -o demo.pdf

Options

--page-size a4|letter|legal|a3|a5
Paper size, A4 by default.
--margin 25mm
Page margin.
--font-size 11
Body text size in points.
--font NAME
A font family installed on the machine.
-o FILE|DIR
Where to write. Without it, letter.docx becomes letter.pdf.

All options: deft doc to-pdf --help. Add --json for a structured result.

A real run

The released deft on a real file. This is exactly what it printed:

$ deft doc to-pdf demo.docx -o demo.pdf
ok doc.to-pdf demo.docx -> demo.pdf  6 pages  0.51s

Limits

What it saves an AI agent

Every task in the deft benchmark that uses this command, run by Claude Code (Opus 5.5, medium effort) once without deft and once with deft and its skill installed. The prompt never mentions deft. Each cell reads without → with deft; click a task for the agent's full trace. On 1 of the 5 tasks deft used more tokens: on a short job the agent reads deft's help first.

TaskSolvedTime New tokensFailed commands
Fill a party name into a contract and send itFill in our company name in the SAFE form safe.docx. We are Acme Robotics, Inc. Put it everywhere the form asks for the company name, in capitals where the form uses capitals, and keep the formatting. Save it as acme-safe.docx and make acme-safe.pdf to send to the investor.no → yes40 s → 87 s20.8k → 34.1k0 → 2
Resume for a job portal and a websiteI'm applying for jobs. The portal wants a PDF, so make resume.pdf from my resume.docx. I also want a Markdown copy, resume.md, for my personal site.no → yes78 s → 22 s25.5k → 12.5k4 → 0
RTF report to PDF with its word countreview.rtf is going into the board pack. Make review.pdf from it, and check it is under the 4,000-word limit: write its word count to words.txt.yes → yes85 s → 63 s25.2k → 20.8k5 → 1
Word to PDFConvert demo.docx to demo.pdf.yes → yes59 s → 9 s19.3k → 9.5k3 → 0
Assemble an application from mixed filesPut together one application.pdf for a portal: letter.docx first, then the photo DSCN0010.jpg, then fw9.pdf. Number the pages at the bottom. The portal rejects anything over 1MB.yes → yes95 s → 29 s30.3k → 14.6k1 → 0
All 5 tasks3 → 5357 s → 211 s121.2k → 91.5k13 → 3

One run per task and arm, on 2026-11-15. Deft was improved against these same tasks, so this is a development benchmark, not a held-out test. New tokens are input not served from the prompt cache, plus output. Failed commands are the agent's tool calls that returned an error: shell commands, and file reads and writes. All tasks: the benchmark.

Install

curl -fsSL https://deftcli.com/install.sh | sh

Or brew install firstprayer/tap/deft. One binary for macOS and Linux; the script also sets up the skill for Claude Code and Codex. Install guide.