OpenOffice Default Paper Size for Printing

Sometimes, OpenOffice and Linux don’t play well together. One little quirk with OpenOffice on Ubuntu about drove me nuts recently. It’s a problem that, if judging by number of forum posts on the topic, is experienced quite often. The problem is with the default page size for printing in OpenOffice. We had this problem recently at work, and after quite a bit of searching, I found several solutions that I thought I’d share with you.

In our case, all of our printers use A4 sized paper, but OpenOffice constantly defaults to “Letter” size for printing. This is incredibly annoying because you have to reset the page size each time you print a document from OpenOffice or be faced with strange page formatting or missing lines of text. This happens no matter what the default page size for the printer, independent of CUPS settings, and no matter what page size your document is formatted … it ALWAYS defaults to printing Letter sized paper.

Here are the solutions that I found in order that I suggest trying them. Some people suggest changing the default template for OpenOffice to fix the problem, and that works for newly created files, but we need a better solution, one that works with existing files.

Here are the solutions I found promising:

1. Change the default paper size in /etc/papersize
This is the first place to look and solved the problem most of the time. Simply edit /etc/papersize and change “letter” to “a4” then restart OpenOffice.

2. Check for settings in ~/.cups
In some cases, CUPS saves printer settings for individual users in their home directory (don’t ask me why). If you see a .cups directory in your home directory, open it and see if “Letter” isn’t set as the default paper size in there. (In my case, I just deleted the .cups directory all together).

3. Check for poorly formatted PPD files
Check the PPD file for your printer in /etc/cups/ppd/ to see if it has errors. Apparently, some PPD files are incorrectly formatted and cause an error. This problem is most commonly discussed in relation to Brother printers. You can find more info in this bug report.

4. Change DefaultPageSize in SGENPRT.PS
It appears that OpenOffice gets its default media size for some printers from the DefaultPageSize line in the /usr/lib/openoffice/basis3.2/share/psprint/driver/SGENPRT.PS file. More info here.

Hopefully one of the above solutions solves the problem for you. If not, please feel free to leave your ideas and solutions in the comments below.

Loading comments...

Welcome to Starry Hope!

Starry Hope is a site about technology with a focus on open source software and Linux based operating systems. I try to post helpful information for others as I solve problems in the process of my work and play with computers. Be sure to subscribe to my RSS Feed or follow me on YouTube and Twitter.-- Jim Mendenhall