Microsoft Publisher is gone from Microsoft 365 — batch conversion isn't the hard part, verification is

# opensource# python# productivity# tutorial
Microsoft Publisher is gone from Microsoft 365 — batch conversion isn't the hard part, verification isalapha888

On October 1, 2026, Microsoft removed Publisher from Microsoft 365. Support for the perpetual version...

On October 1, 2026, Microsoft removed Publisher from Microsoft 365. Support for the perpetual version ends October 13, 2026.

That leaves a lot of .pub files behind — especially outside large companies. For roughly thirty years, Publisher was the default desktop-publishing tool for schools, churches, clubs, and small offices: newsletters, certificates, flyers, directories. Those archives do not disappear just because the application did.

The standard advice is to convert everything to PDF. That part is genuinely easy. The hard part is knowing which conversions silently failed.

The silent failure problem

A typical batch script looks like this:

for file in *.pub; do
  soffice --headless --convert-to pdf "$file"
  if [ $? -eq 0 ]; then
    echo "Converted: $file"
  fi
done
Enter fullscreen mode Exit fullscreen mode

The flaw is the exit code. An exit code of 0 does not guarantee a PDF exists.

I ran into two concrete cases while testing with real Publisher files:

  1. Exit 0, no output. A truncated .pub file made the converter exit with code 0 — and produce no PDF at all. A script that trusts the exit code logs a success for a document that is simply gone.
  2. The fake .pub. A plain text file renamed to .pub will happily "convert" as a text document in some pipelines. The output exists, the exit code is 0, and the PDF contains none of the original layout — because there never was one. The check that catches this is the OLE2 header: a real Publisher file has one; a renamed text file does not.

There is a quieter third case: a PDF is produced, but its text did not survive conversion. That file looks fine in a file listing and is useless as an archive.

Why local matters here

The obvious alternative — uploading files to an online converter — is a poor fit for exactly the archives Publisher leaves behind. School and church files can contain directories, rosters, and contact details accumulated over decades. Converting locally keeps those files on your own machine, and most online converters process one file at a time anyway, which is not workable for a folder of hundreds.

A verification pass: OK / REVIEW / FAILED

What a batch migration actually needs is a report, not just a pile of PDFs. The approach I settled on classifies every file:

  • OK — PDF produced, has pages, and contains extractable text.
  • REVIEW — PDF produced, but little or no extractable text. Check it visually before deleting the original .pub.
  • FAILED — No usable PDF: silent failure, corrupted file, or not a real Publisher file in the first place.

One honest limit: this verifies that a PDF exists, has pages, and carries text. It cannot prove the layout looks right. Conversion quality is whatever the underlying converter (in this case LibreOffice's libmspub) produces, and complex multi-column layouts are known to convert imperfectly — which is precisely why the REVIEW category exists instead of a binary pass/fail.

The tool

I packaged this as a small open-source CLI, PubAudit (MIT, Python standard library only, uses LibreOffice + poppler-utils):

https://github.com/alapha888/pubaudit

python3 pubaudit.py /path/to/folder
# PDFs + pubaudit-report.csv / pubaudit-report.html land in
# /path/to/folder/pubaudit-output/
Enter fullscreen mode Exit fullscreen mode

Tested behaviour, from a run over five real Publisher flyers, one renamed text file, and one truncated file: the five real files came back OK with page counts and extracted text; both bad files came back FAILED — including the truncated one whose converter had exited 0.

If you are sitting on a folder of .pub files before the October 13 support deadline, converting them is the easy part. Verify the outputs before you delete anything.