Convert

Convert DOCX to PDF on Mac (and Keep the Layout)

By the Smol team9 min read

To convert DOCX to PDF on a Mac, open the file in Pages and choose File → Export To → PDF, or run soffice --headless --convert-to pdf file.docx if you have LibreOffice. Both take a few seconds. Neither of them is where this goes wrong.

What goes wrong is the font. A DOCX does not contain its typefaces; it names them. Ours named Calibri and Cambria, and macOS ships neither. Whether your PDF looks like the Word document depends entirely on what the converter puts in their place, and that answer differs by tool in ways you can measure.

Which route should you use?

Same 4,719-byte two-page test document through every route available on a stock Mac plus one install.

RouteInstalled?TimePDF bytesLayout kept?
Pages, Export To → PDFYesnot measured—Yes, with font substitution
Print dialog → PDF → Save as PDFYesnot measured—Yes, from any printable app
textutil -convert pdfYes—refusesNo such output format
textutil + cupsfilterYesunder 1 s25,511No — plain text only
soffice --headless --convert-to pdfNo3.22 s29,350Yes
Smol, convert to pdfNo5,067 ms29,350Yes — same engine

The last two rows produced the same file. That is not a coincidence and it is worth being direct about: Smol’s Office conversion is LibreOffice-backed. Both PDFs were 29,350 bytes, two pages, with Producer: LibreOffice 26.2.3.2 (AARCH64) and Creator: Writer in the metadata and identical embedded font subsets. A byte comparison found the first difference at byte 19,887 — the creation timestamp.

Can you convert DOCX to PDF without installing anything?

Yes, twice over, and neither route is the one the Terminal tutorials suggest.

Pages. It opens DOCX directly. Then File → Export To → PDF, pick an image quality, save. For a single document this is the correct answer and it costs nothing. Pages will warn you about anything it changed on import, which is more than most converters do.

The print dialog. ⌘P in any app that can print, then the PDF dropdown at the bottom left and Save as PDF. It uses Quartz, it is universal, and it renders exactly what the app on screen renders — which makes it the most faithful route available when the app already displays the document correctly.

Not textutil. This is the recommendation that gets copied around and it does not work:

$ textutil -convert pdf contract.docx
Invalid output format.

Exit code 1. textutil writes txt, rtf, rtfd, html, doc, docx, odt, wordml and webarchive. PDF is not on the list and never has been. What it can do is feed a plain-text PDF route that is entirely built in:

textutil -convert txt -output plain.txt contract.docx
cupsfilter plain.txt > contract.pdf

That produced a valid 25,511-byte one-page PDF stamped Producer: macOS Version 27.0 (Build 26A428) Quartz PDFContext. It also threw away every heading, every font and the whole layout, and collapsed two pages into one. Useful for archiving text, useless for sending a contract. Note also that cupsfilter will not take HTML on macOS 27 — it answers No filter to convert from text/html to application/pdf — so the intermediate-HTML variant of this trick is dead.

Why does the layout shift when you convert DOCX to PDF?

Because line breaks are decided at render time from the metrics of the font that is actually available, and the font named in your DOCX usually is not. Microsoft’s defaults — Calibri, and since 2024 Aptos — do not ship with macOS. Every converter therefore substitutes, and they do not substitute alike.

We made four copies of the same document, changed only the body font named inside it, and read back which typeface each PDF actually embedded:

Named in the DOCXmacOS would pickLibreOffice embeddedPDF bytes
CalibriVerdanaCarlito29,350
Cambria (headings)Times New RomanCaladea29,350
AptosVerdanaLiberation Serif32,147
Segoe UIVerdanaLiberation Serif32,147
Helvetica (installed)HelveticaHelvetica32,199

Read the first two rows carefully, because they are good news. Carlito and Caladea are metric-compatible clones of Calibri and Cambria: every glyph occupies the same advance width as the original, so lines break in the same places and page counts hold. LibreOffice bundles them precisely so Word documents survive. The typeface is not Calibri, but the layout is Calibri’s layout.

The third row is the failure. Aptos has no metric-compatible clone, so LibreOffice fell all the way back to Liberation Serif — a serif face standing in for a sans-serif one. Your headings stay sans, your body text turns into something Times-shaped, and every line break moves. If you have a document written in the current Word default and the PDF came out looking oddly old-fashioned, that is what happened.

How do you stop the fonts from substituting?

In rough order of how well they work.

  • Export the PDF from the machine that wrote the document. If it was written in Word on Windows with Aptos installed, the PDF made there is correct by definition. A conversion on another machine is always a re-render.
  • Install the font. Calibri and Cambria come with Microsoft Office for Mac; Aptos comes with Microsoft 365. Once present, they are embedded as themselves — our Helvetica control proves the mechanism, coming back as CAAAAA+Helvetica rather than a stand-in.
  • Embed the fonts in the DOCX before you send it. Word’s Save → Embed fonts in the file option carries the outlines inside the document, so the converter has nothing to guess. Most licences permit embedding for viewing.
  • Design in fonts that exist everywhere. Helvetica, Times New Roman, Arial, Georgia and Verdana are on every Mac and every Windows machine. A contract template in Georgia will never surprise you.
  • Or send the DOCX and stop converting. If the recipient is going to edit it, a PDF is the wrong deliverable anyway.

One thing that does not help: converting twice, or via ODT, or through a web service. Every one of those is another render with another substitution table.

What about two hundred documents?

Here the free route wins on raw speed, and it wins by a lot. Twelve copies of the test document, three ways:

RouteTotal timePer file
soffice, all 12 files in one call3.52 s0.29 s
soffice, called once per file in a loop22.44 s1.87 s
Smol, all 12 in one job40.43 s3.37 s

The gap between the first two rows is the lesson most shell scripts get wrong. LibreOffice pays its startup cost once per invocation, so for f in *.docx; do soffice …; done is 6.4× slower than handing it the whole glob:

soffice --headless --convert-to pdf --outdir ./out *.docx

Smol was the slowest of the three at 40.43 seconds for twelve files. It buys you a Finder Quick Action, a watched folder, and a single drop target that also takes spreadsheets, presentations, images and video without you choosing a filter — not throughput. If throughput is the whole problem, use the command above.

For a repeatable pipeline there is a third option worth knowing: Smol ships an MCP server, so Claude Code, Codex and Google Antigravity can drive the conversion directly as a tool call. That matters when the conversion is one step inside a larger job an agent is already running — gather the documents, convert, compress the results, file them — rather than something you are running by hand.

When is Smol not the answer here?

For DOCX to PDF specifically, most of the time. Pages is already installed, it is free, and for one document it is the shortest path there is. LibreOffice is free, and since it is the same engine producing the same bytes, paying for a wrapper around it only makes sense if you want the wrapper.

Where the wrapper earns its keep:

  • You do not want LibreOffice on the machine. A 700 MB office suite to convert documents is a real cost, and Smol bundles what it needs.
  • Mixed folders. DOCX, XLSX, PPTX, images and video in one drop, one output setting. Document output covers pdf docx odt rtf txt html; the full format reference is here. Note there is no .pages output.
  • Right-click in Finder. A Quick Action for people who will never open a Terminal.

Smol is $29 once, which is the comparison that matters against Acrobat’s annual fee rather than against LibreOffice’s zero. If the PDF then turns out to be too big for the portal you are uploading it to, that is a separate job.

Going the other way — spreadsheets rather than documents — has its own traps: XLSX to CSV loses more than you expect.

How this was measured

MacBook Pro (Mac14,9), Apple M2 Pro, 10 cores, 16 GB, macOS 26A428. LibreOffice 26.2.3.2 (AARCH64), Smol 1.0.34. Fonts read back with pdffonts, metadata with pdfinfo and exiftool, substitution predictions with fc-match. Timings from /usr/bin/time -p, wall-clock real; Smol’s figures are its own reported job durations.

The test document was built for this article, not taken from anywhere: an HTML file was run through textutil -convert docx and then its word/document.xml was edited so the body runs name Calibri and the heading runs name Cambria. Worth recording because it is a fidelity finding in itself — textutil flattened every font-family in the source HTML to “Times” and dropped the HTML table entirely. Pages and the print dialog were described but not timed, because neither can be driven headlessly. Every fixture was deleted afterwards.

Frequently asked questions

How do I convert DOCX to PDF on a Mac without Word?

Open it in Pages, which is already installed, then File → Export To → PDF. Or press Command-P in any app that can open the file and choose Save as PDF from the PDF dropdown. If you have LibreOffice, soffice --headless --convert-to pdf file.docx does it from the Terminal in about three seconds.

Can textutil convert DOCX to PDF?

No. Running textutil -convert pdf prints "Invalid output format." and exits 1. Its supported outputs are txt, rtf, rtfd, html, doc, docx, odt, wordml and webarchive. You can chain textutil -convert txt into cupsfilter to get a PDF, but that produces plain text with the layout removed.

Why does my PDF look different from the Word document?

The DOCX names fonts rather than containing them, and Calibri, Cambria and Aptos do not ship with macOS. LibreOffice substitutes Carlito for Calibri and Caladea for Cambria, which are metric-compatible so the layout holds. Aptos has no clone and fell back to Liberation Serif, a serif face, which moves every line break.

How can I tell which fonts my PDF actually used?

Run pdffonts output.pdf. It lists every embedded font with its name and whether it is embedded. If you wrote the document in Calibri and pdffonts reports Carlito, the metrics match and the layout is intact. If it reports LiberationSerif, the text has been re-flowed in a different typeface.

What is the fastest way to convert a folder of DOCX files to PDF?

Pass them all to LibreOffice in one invocation: soffice --headless --convert-to pdf --outdir ./out *.docx. Twelve files took 3.52 seconds that way versus 22.44 seconds calling soffice once per file in a loop, because the suite pays its startup cost per invocation rather than per document.

Keep reading