deniz.in

Markets

Weather

Loading weather

· via dev.to (home feed)

Microsoft Publisher's removal strands .pub files, and PDF conversion needs verifying

Microsoft removed Publisher from Microsoft 365 on October 1, with perpetual-license support ending October 13. A dev.to post argues the real migration risk is conversions that fail without raising an error.

Microsoft Publisher's removal strands .pub files, and PDF conversion needs verifying

Publisher's exit leaves decades of files behind

On October 1, 2026, Microsoft removed Publisher from Microsoft 365, and support for the perpetual-license version ends on October 13, 2026, according to a post on dev.to. The change strands a large body of .pub files, particularly outside big organisations. For roughly three decades, the author writes, Publisher was the go-to desktop-publishing application for schools, churches, clubs and small offices, which used it for newsletters, flyers, certificates and membership directories. Those archives outlive the program that created them.

The easy part and the hard part

The usual recommendation is to convert the old files to PDF, and as the dev.to author points out, that step is straightforward. The difficulty is detecting conversions that quietly go wrong.

A typical scripted approach loops over the .pub files, calls a headless converter such as LibreOffice, and checks the exit code. The flaw, according to the post, is that an exit code of zero does not mean a PDF was actually produced. Testing with real Publisher files surfaced three distinct failure modes:

  • A truncated .pub file made the converter exit cleanly while generating no PDF at all. A script that trusts exit codes logs a success for a document that now exists nowhere.
  • A plain text file renamed to .pub can pass through some pipelines as a text document: the output exists, the exit code is fine, and the resulting PDF holds none of the original layout because there never was one. A genuine Publisher file carries an OLE2 header, which is the check that exposes the impostor.
  • The subtlest case: a PDF is generated but its text did not survive the conversion. The file looks healthy in a directory listing and is worthless as an archive.

Keeping the migration local

Uploading archives to a web-based converter is a poor fit for the material Publisher leaves behind, the post argues. Decades-old school and church files can contain rosters, directories and contact details, which is a strong argument for processing everything on your own machine. Online converters also generally handle one document at a time, which is unworkable when a folder holds hundreds of them.

Turning a batch run into a report

The author packaged the approach as PubAudit, a small MIT-licensed command-line tool written in Python using only the standard library, built on top of LibreOffice and poppler-utils. It converts a folder of .pub files and classifies every result in CSV and HTML reports:

  • OK — a PDF was produced, has pages, and contains extractable text.
  • REVIEW — a PDF exists but little or no text could be extracted; inspect it by eye before removing the original.
  • FAILED — no usable PDF: silent failure, corruption, or a file that was never a real Publisher document to begin with.

In a test run over five genuine flyers, one renamed text file and one truncated file, the author reports that the five real documents came back OK with page counts and extracted text, and both defective files were flagged FAILED — including the truncated one whose converter had exited with code zero.

One honest limitation is acknowledged: the checks prove that a PDF exists, has pages and carries text, not that its layout is faithful. Conversion quality is whatever the underlying engine, LibreOffice's libmspub, delivers, and complex multi-column designs are known to come out imperfectly. That is precisely why REVIEW exists as a middle category instead of a binary pass or fail.

Why it matters

Deadlines like the October 13 end-of-support date push people to mass-convert and then delete their originals. Exit codes are not evidence of success, and the failure modes here are silent by nature: missing outputs, fake documents that convert anyway, and PDFs that lost their text somewhere along the way. The lesson generalises well beyond Publisher — any batch document migration needs a verification pass that inspects the outputs themselves before the source files are discarded. For schools, congregations and small offices holding years of Publisher material, a report-and-review workflow is the difference between a usable archive and a folder of empty or broken PDFs.

  • #microsoft-365
  • #microsoft-publisher
  • #pdf
  • #migration
  • #open-source

Related posts