I need to view a .pub file. How can I view the file or convert it to a more mainstream format (such as a PDF?)
In case anyone runs into this question, a Microsoft Publisher importer is expected in LibreOffice 3.7. More info:
I spent a long time investigating this recently as I needed to index .pub files for use in Xapian.
The conclusion is that the only thing that can read .pub files is publisher.
You can run publisher in CrossOver Office with some success. I have used this in the past and I had no problems.
This website: http://www.zamzar.com/ appears to be able to convert .pub files to a number of formats including .odt and .pdf (source: http://blog.zamzar.com/2008/01/25/convert-ms-publisher-files-pub-files-to-doc-pdf-odt-rtf-and-more/)
The file needs to be under 100MB and the converted file will be sent to you by email.
The only website able to convert PUB files online to PDF I found was http://convert.neevia.com/
I know this isn't an actual ubuntu software, but this website can help you. It converts the pub file to pdf
How to view a Microsoft Publisher .pub file and convert it to PDF on Linux Ubuntu
A couple answers mention LibreOffice and/or LibreOffice Draw. Here are some more details on that.
I just tested these steps on Linux Ubuntu 20.04, with LibreOffice 188.8.131.52.
1. GUI method: open it up in LibreOffice Draw:
In any of the LibreOffice programs, including Draw, Calc, Impress, or Writer, go to
Open... --> navigate to your
.pub file, select it, and click on the
It will open up in LibreOffice Draw, regardless of which LibreOffice program you used to go to
Once it is open in LibreOffice Draw, you can optionally export it as a PDF if you want by going to
Export As -->
Export as PDF... --> change any export settings you'd like to and click on the
2. Command-line method: convert .pub files to .pdf from the terminal
Libreoffice also supports a fantastic
--headless command-line option which lets you convert from .pub to .pdf files from the command-line! I learned how to do this by studying this answer here: Command
libreoffice --headless --convert-to pdf test.docx --outdir /pdf is not working. The command I came up with, which works great, is this:
libreoffice --headless --convert-to pdf:draw_pdf_Export "path/to/myfile.pub"
It takes just a couple seconds.
I tried opening it up in Google Drive/Google Docs too, since that work great for converting Excel and Microsoft Word docs between formats, but it looks like Google doesn't yet support the .pub file format. Perhaps they will in the future.