Welcome!
Important information
-- Spectre and Meltdown vulnerabilities
-- Change in MX sources

News
-- MX Linux on social media: here
-- Mepis support still here

Current releases
-- MX-17.1 Final release info here
-- antiX-17 release info here

New users
-- Please read this first, and don't forget to add system and hardware information to posts!
-- Here are the Forum Rules

LibreOffice printer properties default paper size fix (hope)

Questions about printers and scanners, hardware-related and/or software-related can be asked here, as well as posting of tutorials.
Message
Author
User avatar
Eadwine Rose
Forum Veteran
Forum Veteran
Posts: 5969
Joined: Wed Jul 12, 2006 2:10 am

LibreOffice printer properties default paper size fix (hope)

#1 Post by Eadwine Rose » Tue Mar 18, 2014 11:41 am

I hope anyway as said in the subject line. I think I found the solution to the wrong paper size when I start printing something in LO. I figured I'd chuck it in here in this forum as this fits most. My machine runs MX14, I don't know if the file mentioned below is located in the same spot in Mepis.


Every time I would print something, doesn't matter what the paper size of the document is, once proceeding to print and looking in the print properties in LO it would always default to letter and I'd have to change it as I wanted it to be A4.

I checked all my settings, printer and what not, everything was set to be A4, however LO would refuse to use it and always default to Letter. Irritating but oh well.


However some googling around led me to the LC_PAPER clue.


I found that everything was set to en_US using the command "locale" in a terminal

Code: Select all

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_US.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
Now, I did not want to change them all, I like my settings! Just want to change the paper one as that in the end (on my machine anyway) controls the "letter" and "a4" and such sizes in the properties mentioned above.

As it happens the great britain locale uses A4 paper size, so I needed to find a way to change LC_PAPER to read en_GB.UTF-8

Here is how:

Using a root Thunar go to /etc/default/ and backup the locale file in there (copy paste, whatever you like).

Then open up /etc/default/locale with leafpad and add on a new line: LC_PAPER=en_GB.UTF-8

After that save, log out and log in.

Now when I enter "locale" I get this:

Code: Select all

$ locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_GB.UTF-8
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
AHA!

I open up a file in LO, go to print, and then find the printer properties, and bingo: paper size is now set to A4 :happy:


Of course I have not tested this for a longer time, I have not yet rebooted for instance, but this sure looks hopeful as nothing else so far has worked!



Edited to add:
Editing /etc/papersize to read a4 for me makes no difference to the print properties in LO, I have tried that earlier this week.
MX-17.1_x64 Horizon 14-3-2018 * 4.15.0-1-amd64 ext4 Xfce 4.12.3 * AMD Asus M4A785TD-V EVO AM3 * ASUS GF GT640-1GD5-L NVIDIA 384.130 * AMD Proc. Athl II X4 635, sAM3 * HDA ATI SB VT1708S An * 2x4Gb DDR3 1600 Kingst * 22" Samsung SyncM P2250 * HP F2280

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22222
Joined: Wed Jul 19, 2006 6:13 am

Re: LibreOffice printer properties default paper size fix (h

#2 Post by Jerry3904 » Tue Mar 18, 2014 11:45 am

Good work! I wonder why were those settings not changed when you selected your locale in the first place?
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
Eadwine Rose
Forum Veteran
Forum Veteran
Posts: 5969
Joined: Wed Jul 12, 2006 2:10 am

Re: LibreOffice printer properties default paper size fix (h

#3 Post by Eadwine Rose » Tue Mar 18, 2014 11:47 am

*hands in the air* Not a clue.

Libreoffice tends to be very stubborn. Google is ridden with help messages like this: "how to change default print size in LO and all is set to a4"

At least right now it is sorted for me.. I will go and reboot now and report back!
MX-17.1_x64 Horizon 14-3-2018 * 4.15.0-1-amd64 ext4 Xfce 4.12.3 * AMD Asus M4A785TD-V EVO AM3 * ASUS GF GT640-1GD5-L NVIDIA 384.130 * AMD Proc. Athl II X4 635, sAM3 * HDA ATI SB VT1708S An * 2x4Gb DDR3 1600 Kingst * 22" Samsung SyncM P2250 * HP F2280

User avatar
Jerry3904
Forum Veteran
Forum Veteran
Posts: 22222
Joined: Wed Jul 19, 2006 6:13 am

Re: LibreOffice printer properties default paper size fix (h

#4 Post by Jerry3904 » Tue Mar 18, 2014 11:51 am

I've had trouble the other way with LO: wants to switch my Letter format to A4.
Production: 4.15.0-1-amd64, MX-17.1, AMD FX-4130 Quad-Core, GeForce GT 630/PCIe/SSE2, 8 GB, Kingston SSD 120 GB and WesternDigital 1TB
Testing: AAO 722: 4.15.0-1-386. MX-17.1, AMD C-60 APU, 4 GB

User avatar
Eadwine Rose
Forum Veteran
Forum Veteran
Posts: 5969
Joined: Wed Jul 12, 2006 2:10 am

Re: LibreOffice printer properties default paper size fix (h

#5 Post by Eadwine Rose » Tue Mar 18, 2014 11:52 am

Still A4 after a reboot :smile:



Ah, equally annoying Jerry!
MX-17.1_x64 Horizon 14-3-2018 * 4.15.0-1-amd64 ext4 Xfce 4.12.3 * AMD Asus M4A785TD-V EVO AM3 * ASUS GF GT640-1GD5-L NVIDIA 384.130 * AMD Proc. Athl II X4 635, sAM3 * HDA ATI SB VT1708S An * 2x4Gb DDR3 1600 Kingst * 22" Samsung SyncM P2250 * HP F2280

User avatar
anticapitalista
Forum Veteran
Forum Veteran
Posts: 5672
Joined: Sat Jul 15, 2006 10:40 am

Re: LibreOffice printer properties default paper size fix (h

#6 Post by anticapitalista » Tue Mar 18, 2014 12:07 pm

Eadwine, did you need to change /etc/papersize to A4?
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX-17 "Heather Heyer" - lean and mean.
https://antixlinux.com

User avatar
Eadwine Rose
Forum Veteran
Forum Veteran
Posts: 5969
Joined: Wed Jul 12, 2006 2:10 am

Re: LibreOffice printer properties default paper size fix (h

#7 Post by Eadwine Rose » Tue Mar 18, 2014 12:12 pm

I DID do that earlier this week, but that didn't have this effect. It is still set that way, but I don't know if changing that is absolutely necessary.


Flip it, gonna try that now haha.. changing papersize back to normal!
MX-17.1_x64 Horizon 14-3-2018 * 4.15.0-1-amd64 ext4 Xfce 4.12.3 * AMD Asus M4A785TD-V EVO AM3 * ASUS GF GT640-1GD5-L NVIDIA 384.130 * AMD Proc. Athl II X4 635, sAM3 * HDA ATI SB VT1708S An * 2x4Gb DDR3 1600 Kingst * 22" Samsung SyncM P2250 * HP F2280

User avatar
anticapitalista
Forum Veteran
Forum Veteran
Posts: 5672
Joined: Sat Jul 15, 2006 10:40 am

Re: LibreOffice printer properties default paper size fix (h

#8 Post by anticapitalista » Tue Mar 18, 2014 12:13 pm

I ask since I have locales set to US, but default papersize in LO printer is A4.

Code: Select all

 locale
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
My /etc/papersize says A4
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX-17 "Heather Heyer" - lean and mean.
https://antixlinux.com

User avatar
Eadwine Rose
Forum Veteran
Forum Veteran
Posts: 5969
Joined: Wed Jul 12, 2006 2:10 am

Re: LibreOffice printer properties default paper size fix (h

#9 Post by Eadwine Rose » Tue Mar 18, 2014 12:17 pm

Nope it is not needed. My /etc/papersize now says letter like it used to from the getgo; restored the backup, still A4 in print properties in LO after a reboot.

Adding the line to locale as per first post is what fixed it for me.
MX-17.1_x64 Horizon 14-3-2018 * 4.15.0-1-amd64 ext4 Xfce 4.12.3 * AMD Asus M4A785TD-V EVO AM3 * ASUS GF GT640-1GD5-L NVIDIA 384.130 * AMD Proc. Athl II X4 635, sAM3 * HDA ATI SB VT1708S An * 2x4Gb DDR3 1600 Kingst * 22" Samsung SyncM P2250 * HP F2280

User avatar
Gaer Boy
Forum Guide
Forum Guide
Posts: 2123
Joined: Sat Jun 06, 2009 6:06 am

Re: LibreOffice printer properties default paper size fix (h

#10 Post by Gaer Boy » Tue Mar 18, 2014 1:35 pm

Jerry3904 wrote:I've had trouble the other way with LO: wants to switch my Letter format to A4.
Very sensible, Jerry. It's about time America joined the rest of the world!

AsRock FM2A88X-ITX+, A8-6500, 8GB, 120GB Samsung SSD (GPT), 1TB HDD (MBR), MX-17.1
Lenovo Thinkpad X220, dual-core i5, 3MB, 320GB Hitachi HDD, Win7, MX-17.1

Post Reply

Return to “Print/Scan”