Problems setting default page size to A4

Arch Linux build of LibreOffice Locale is set to UK, and shows up correctly in Tool > Options > Languages. However, any time I attempt to print, the page size is defaulted to Letter, not A4. If I set the page size in the document to A4 and save it, next time I reopen the same document and attempt to print, it reverts to Letter.

After hunting around, I found suggestions to create a default template with the page size set. I did so, thought the problem was solved, however, when I go to print a document created with the new default template, it still wants to print to Letter…

I’ve also attempted to set the option in the print dialog to use only paper size from printer preferences (which shows up correctly as A4). Makes no difference. In fact, if I go back and look at the properties in printer preferences, the option is still ticked, but it now shows Letter instead of A4.

I’ve had a look at other versions of LibreOffice (an older Debian build and the 64-bit Windows version), which are correct, but an older Manjaro build shows the same problem.

This is becoming very annoying. Can someone please tell me how I get LibreOffice to follow the correct locale settings and use A4?

Have you looked at the printer settings in the OS printer manager?

Check the output of the paperconf command line. If it says a4 things would be odd and you may have to check the LC_PAPER setting (locale LC_PAPER should give the three values 297, 210, UTF-8); if it says letter then either enter a4 in file /etc/papersize (system-wide default) or set the PAPERSIZE environment variable or let the PAPERCONF variable point to a different papersize file. See man paperconf for details.

Thanks. That gave me the answer. paperconfwas returning “letter”, though LC_PAPER was correctly reporting A4 (297,210,UTF-8). Setting /etc/papesize to A4 seems to have fixed it, though I had to go and reset the default template to get the print dialog to show the correct page size.

libpaper is listed as an optional dependency for LibreOffice, but is required by cups and ghostscript. I never realised that it needed to be configures as well. Thought that locale should cover it. Checking a Majaro install, it seems to have the same problem as my Arch install, so it looks as though I’m not the only one to overlook the problem.

I do not understand what this means. Where is the command line. Isn’t there something in the menus that does this. Where are the environmental variables mentioned?

It’s part of the operating system and no, there are no menus for that unless your window manager provides some administrative interface for it (don’t know of any). Open a terminal console and enter man paperconf or read the manual page there: paperconf(1): print paper config informations - Linux man page and papersize(5): specify preferred paper size - Linux man page

To permanently change paper size for all users on that machine, as user root edit the file /etc/papersize and replace letter with a4

Thanks for your reply, very kind. However I am not a programmer and have no idea how to access the Linux terminal (not something you expect to have to do to set A4 printing). My programming skills stop at basic. I have tried to get my head round linux but I found it infuriatingly complicated.
I guess I will have to reset the paper to A4 everytime I print.

This is mainly applicable for people using LibreOffice under Arch (possibly other Arch-derived distros as well, since it seems to apply to Manjaro as well).

Arch lists libpaper as an optional dependency for LibreOffice, but it is a dependency for both ghostscript and cupsso it will probably be installed on most Arch systems that have LibreOffice installed. While locale-gen will correctly set LC_PAPER for a given locale, it does not touch /etc/papersize or do anything else to set pageconf. As a result, LibreOffice will not show anything other than the pageconf default of “letter”.

My solution was to edit /etc/papersize to include the required A4 paper size.

This gave me problems for ages.

On Debian Bullseye certainly and probably most other Debian distros, , the /etc/papersize file is set ot ‘letter’.

Unless you change that to ‘A4’, it matters not what language pack you install, what you set the default template
up as, or any of the other solutions above.
The print dialog will default to ‘letter’ size.

As soon as you change that file to ‘A4’ and print, it will default to ‘A4’.

And how is this answer different from the already accepted one?

Xubuntu 20.04 (and probably others too):

In a terminal:

  • paperconf results in A4

  • locale LC_PAPER results in 297,210,UTF-8 hich is A4

printer settings default printer set to A4

New document is still Letter.

Solution for me:

Tools > Options > Language Settings > Languages > Locale setting > “English (UK)” which turns page size to A4, contrary to “English US”.

Rationale while still in this window: I am Dutch, using default USA interface, using Dutch euro, using “.” as decimal separator, using “Dutch” as default language for new documents.

(reformatted by ajlittoz to make it more legible)

So this is the reverse of what original question was about: there OP had proper LO locale which used A4, but needed to also configure paperconf/LC_PAPER; here the latter two were correct, but LO locale needed to be set.