# Problems setting default page size to A4 edit

Arch Linux build of LibreOffice 6.4.1.2. 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?

edit retag close merge delete

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

( 2020-03-02 16:44:49 +0100 )edit

Sort by » oldest newest most voted

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.

more

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.

( 2020-03-03 09:32:36 +0100 )edit

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?

( 2020-09-05 12:36:48 +0100 )edit

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 paperconfor read the manual page there: https://linux.die.net/man/1/paperconf and https://linux.die.net/man/5/papersize

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

( 2020-09-07 13:29:01 +0100 )edit

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.

( 2020-09-07 16:11:03 +0100 )edit

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'.

more

( 2020-08-03 20:21:25 +0100 )edit

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.

more
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 1, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "math_score": 0.16931603848934174, "perplexity": 3262.6064566287428}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "plain"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "warc_path": "s3://commoncrawl/crawl-data/CC-MAIN-2021-04/segments/1610703496947.2/warc/CC-MAIN-20210115194851-20210115224851-00132.warc.gz"}