Microsoft Publisher was always Windows-only, which left Linux users without a native way to open .pub files. With Publisher retiring in October 2026, Linux users need reliable methods to convert these files to usable formats. Fortunately, LibreOffice provides a solid open-source solution that works well on most Linux distributions.
Why Publisher Files Are a Problem on Linux
Microsoft never released Publisher for Linux, and the .pub file format is proprietary. This means:
Convert your Publisher files
Get editable PowerPoint files and PDFs from your .pub files.
Start free preview- You can't install Publisher through Wine or compatibility layers
- Online converters require uploading files to third-party servers
- Without conversion, you're locked out of any .pub files you receive
Linux users have always needed alternative approaches to handle Publisher files, and LibreOffice has been the most reliable option.
Installing LibreOffice on Linux
Most Linux distributions include LibreOffice by default or make it available in their package repositories.
Ubuntu/Debian:
sudo apt update
sudo apt install libreoffice-draw
Fedora:
sudo dnf install libreoffice-draw
Arch Linux:
sudo pacman -S libreoffice-fresh
LibreOffice Draw is the component that handles Publisher files. The full LibreOffice suite includes Draw, but you can install just the Draw component if you want to save disk space on some distributions.
Converting a Single .pub File
Once LibreOffice is installed, you can convert Publisher files from the command line or the GUI.
Command-line conversion to PDF:
soffice --headless --convert-to pdf document.pub
Command-line conversion to ODP (editable presentation format):
soffice --headless --convert-to odp document.pub
The --headless flag runs LibreOffice without opening a window, which is useful for scripting and automation.
GUI method:
- Right-click the .pub file in your file manager
- Choose "Open with LibreOffice Draw"
- Review the document
- File → Export as PDF, or File → Save As and choose a different format
Batch Converting Multiple Files
If you have a folder full of Publisher files, you can convert them all at once using a simple shell script.
Convert all .pub files to PDF:
for file in *.pub; do
soffice --headless --convert-to pdf "$file"
done
Convert all .pub files to ODP:
for file in *.pub; do
soffice --headless --convert-to odp "$file"
done
These commands work in any directory. Navigate to your folder of .pub files and run the appropriate command. LibreOffice will process each file and save the output in the same directory.
Converting to PowerPoint Format (PPTX)
LibreOffice can export to PowerPoint format, but the process requires an intermediate step:
- Convert .pub to ODP (LibreOffice's presentation format)
- Convert ODP to PPTX
Two-step command:
soffice --headless --convert-to odp document.pub
soffice --headless --convert-to pptx document.odp
You can script this for batch conversion:
for file in *.pub; do
soffice --headless --convert-to odp "$file"
done
for file in *.odp; do
soffice --headless --convert-to pptx "$file"
done
This gives you PowerPoint files that you can open in Google Slides, Canva, or Microsoft PowerPoint on Windows or Mac.
Conversion Quality and Limitations
LibreOffice's .pub support is reverse-engineered, which means it's not perfect:
What converts well:
- Basic text content
- Simple layouts
- Imported images
- Page dimensions
What might have issues:
- Complex overlapping elements
- Custom fonts (they'll substitute with similar fonts)
- Advanced text effects and transparency
- Newer .pub files from Publisher 2019 or later
After conversion, always review the output. Most files convert acceptably, but you may need to adjust fonts, spacing, or alignment in files with complex layouts.
Using Docker for Isolated Conversions
If you want to avoid installing LibreOffice on your main system, you can use a Docker container with LibreOffice pre-installed.
Basic Dockerfile:
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y libreoffice-draw
WORKDIR /workspace
Build and use:
docker build -t pub-converter .
docker run --rm -v $(pwd):/workspace pub-converter soffice --headless --convert-to pdf /workspace/document.pub
This approach keeps LibreOffice and its dependencies isolated from your system, which is useful on minimal server installations or when you only need occasional conversions.
Automating Conversions with Scripts
For regular conversion tasks, you can create a reusable script. Save this as convert-pub.sh:
#!/bin/bash
if [ $# -eq 0 ]; then
echo "Usage: $0 <pub-files>"
exit 1
fi
for file in "$@"; do
echo "Converting $file..."
soffice --headless --convert-to pdf "$file"
done
echo "Conversion complete"
Make it executable:
chmod +x convert-pub.sh
Use it:
./convert-pub.sh document.pub another.pub
./convert-pub.sh *.pub
Server-Side Conversion
If you're building a web application that needs to convert .pub files on a Linux server, you can call LibreOffice from your application code.
Python example using subprocess:
import subprocess
def convert_pub_to_pdf(input_path, output_dir):
subprocess.run([
'soffice',
'--headless',
'--convert-to', 'pdf',
'--outdir', output_dir,
input_path
], check=True)
This is how many conversion services work under the hood. They accept file uploads, run LibreOffice in headless mode, and return the converted output.
When LibreOffice Isn't Enough
LibreOffice works well for most Publisher files, but complex documents may not convert perfectly. If you have critical files with custom fonts, layered graphics, or advanced effects, consider:
- Testing the conversion early to catch issues
- Keeping a backup of the original .pub file
- Using a conversion service that provides both PDF and PPTX output for easier post-conversion editing
Conversion services typically use LibreOffice as well, but they handle the intermediate steps and provide polished output formats.
Alternative Tools on Linux
Beyond LibreOffice, a few other options exist for handling .pub files on Linux:
Scribus: A desktop publishing application for Linux. It doesn't open .pub files directly, but you can recreate layouts if you have the original content.
Inkscape: A vector graphics editor. Useful if you need to extract and edit specific graphics from converted files.
GIMP: For raster image editing after conversion, if you want to adjust previews or extract images.
None of these open .pub files natively, but they're useful for post-processing converted content.
Converting Your Archive Before Publisher Retires
If you have an archive of Publisher files and you're on Linux, now is the time to convert them. Once Publisher retires, fewer tools will maintain .pub support, and newer .pub files may become harder to convert as the format drifts from what LibreOffice expects.
Batch-convert your archive to PDF for preservation and to ODP or PPTX for editing. Store the results in an organized folder structure so you can find files later.
Next Steps
LibreOffice's command-line tools make Publisher file conversion straightforward on Linux. For single files, occasional conversions, or scripted batch jobs, it's the best free option available.
For complex files or when you need both PDF and editable PPTX output from a single conversion, try a free preview to see how your files convert before committing.