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

Attachments

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