Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: [was: What can cause printer to crop top of page?] /etc/papersize is ignored
Date: Wed, 27 Dec 2017 19:45:12
Message-Id: 2699658.69ZC6tcFIL@dell_xps
In Reply to: Re: [gentoo-user] What can cause printer to crop top of page? by Mick
1 TLDR: Why is the content of my /etc/papersize being ignored?
2
3 More detail below.
4
5 On Friday, 22 December 2017 16:30:06 GMT Mick wrote:
6 > On Thursday, 21 December 2017 23:20:24 GMT you wrote:
7 > > On Thursday, 21 December 2017 23:01:50 GMT Walter Dnes wrote:
8 > > > Is there a default page size setting in your desktop environment that
9 > > > could've changed?
10 > >
11 > > This problem is happening across different PCs, desktops/DEs and different
12 > > applications. The common factor is they are all using CUPS, the same
13 > > brother driver and the default page size of A4.
14 > >
15 > > I'll have another poke tomorrow into the http GUI of the printer and then
16 > > try to print with MSWindows to see what happens.
17 >
18 > MSWindows prints fine, just as Linux used to until recently. I printed a
19 > portrait layout from Firefox on both MSWindows and Linux.
20
21 A number of you hinted at a paper size mismatch - between printer and PC. You
22 were correct! I foolishly believed what the cups GUI told me, despite some
23 strange behaviour I came across.
24
25 In particular, modifying the printer using the cups GUI ends up changing
26 *some* of the default paper size fields from "A4" (as shown in the GUI) to
27 "Letter" - as shown in this extract of /etc/cups/ppd/HL-3140CW.ppd:
28
29 grep Default /etc/cups/ppd/HL-3140CW.ppd
30 *DefaultColorSpace: RGB
31 *%DefaultOutputOrder: Reverse
32 *DefaultPageSize: A4
33 *DefaultPageRegion: A4
34 *DefaultImageableArea: Letter
35 *DefaultPaperDimension: Letter
36 [snip ...]
37
38 Using the cups GUI to 'Set Default Settings' and (re)selecting "A4" seems to
39 work, as far as the ppd file is concerned.
40
41 However, when I set the printer's Tray 1 from "Any" size to "A4" using its
42 control panel and tried to print a page with:
43
44 lpr -o fit-to-page -o media=A4 -P 'HL-3140CW' test_print.txt
45
46 the printer started blinking like a Christmas tree with the message:
47
48 Size mismatch. Load Letter paper and press Go.
49
50 So I looked in /etc/papersize and saw it is "a4":
51
52 $ cat /etc/papersize
53 a4
54
55 Then I checked the $PAPERSIZE and $PAPERCONF variables both of which appeared
56 to not being set. Using paperconf to interrogate the default setting I got
57 this beauty:
58
59 $ paperconf -d
60 letter
61
62 What the ...?!
63
64 So, why is /etc/papersize being ignored?
65
66 PS. I noticed my locale has LC_PAPER="en_GB.UTF-8". Not sure if relevant, but
67 thought of mentioning it just in case.
68
69 --
70 Regards,
71 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies