Score:0

CUPS printer defaults not being respected, Ubuntu Server

aq flag

I'm using an Ubuntu server as a printer server for devices in the network, its connected to a TM-T20X (receipt thermal printer) using CUPS and sharing it in the network, everything is working as expected except for one issue, whilst printing the size of the receipt is going as 72mm not 80mm, when checking the printer defaults it does actually say 80mm and when checking the ppd file it also says 80mm, (I'm using the Official drivers by Epson).

But, as you can see in the screenshot, its appearing as 72mm, which isn't even mentioned in the ppd file, and when printing I'm getting the options for 52mm or 72mm, but never 80mm. I'm not sure where I can change those default options.

Screenshot showing the default set as "72":

Screenshot showing the default set as "72"

Screenshot showing me setting the default as "80":

Screenshot showing me setting the default as "80"

lpoptions -l shows me this:

PageSize/Media Size: *RP80x200 RP80x2000 RP58x200 RP58x2000 Custom.WIDTHxHEIGHT
Resolution/Resolution: *203x203dpi
TmxPaperReduction/Paper Reduction: Off Top Bottom *Both
TmxBuzzerAndDrawer/Buzzer/ Cash Drawer: *NotUsed InternalBuzzer ExternalBuzzer OpenDrawer1 OpenDrawer2
TmxPaperCut/Paper Cut: NoCut *CutPerJob CutPerPage

It's giving the correct value that I want, but the actual value isn't being used.

Here is the /etc/cups/printers.conf:

# Printer configuration file for CUPS v2.4.1
# Written by cupsd
# DO NOT EDIT THIS FILE WHEN CUPSD IS RUNNING
NextPrinterId 2
<DefaultPrinter EPSON_TM-T20X>
PrinterId 1
UUID urn:uuid:c5d73bc5-6c18-30d9-7bee-7605719da925
Info EPSON TM-T20X
Location
MakeModel EPSON TM Thermal (203dpi)
DeviceURI dnssd://EPSON%20TM-T20X%20(068658)._printer._tcp.local/
State Idle
StateTime 1688937367
ConfigTime 1688939896
Type 53252
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
</DefaultPrinter>

Here is my .ppd

*PPD-Adobe: "4.3"
*% Copyright (C) Seiko Epson Corporation 2018. All rights reserved.
*%
*% PPD file for TM Series Linux CUPS Printer Driver.

*FormatVersion: "4.3"
*FileVersion: "2.0"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "EPTMBATH.PPD"
*Manufacturer: "EPSON"
*Product: "(ThermalPrinter)"
*ModelName:"EPSON TM Thermal"
*ShortNickName:"TM Thermal"
*NickName: "EPSON TM Thermal (203dpi)"
*PSVersion: "(3010.000) 0"
*LanguageLevel: "3"
*ColorDevice: False
*DefaultColorSpace: Gray
*FileSystem: False
*Throughput: "1"
*LandscapeOrientation: Plus90
*VariablePaperSize: True
*TTRasterizer: Type42
*cupsVersion: 1.2
*cupsManualCopies: True
*cupsModelNumber: 100
*cupsFilter: "application/vnd.cups-raster 0 rastertotmtr"
*cupsLanguages: "en"

*% Printer option settings
*OpenGroup: General/General

*% Page size settings.
*OpenUI *PageSize/Media Size: PickOne
*OrderDependency: 10 *PageSize AnySetup
*DefaultPageSize: RP80x200
*PageSize RP80x200/Roll paper 80 x 200 mm: "<</PageSize[204.3 566.9]/ImagingBBox null>>setpagedevice"
*PageSize RP80x2000/Roll paper 80 x 2000 mm: "<</PageSize[204.3 5669.3]/ImagingBBox null>>setpagedevice"
*PageSize RP58x200/Roll paper 58 x 200 mm: "<</PageSize[149.1 566.9]/ImagingBBox null>>setpagedevice"
*PageSize RP58x2000/Roll paper 58 x 2000 mm: "<</PageSize[149.1 5669.3]/ImagingBBox null>>setpagedevice"
*CloseUI: *PageSize

*OpenUI *PageRegion: PickOne
*OrderDependency: 10 *PageRegion AnySetup
*DefaultPageRegion: RP80x200
*PageRegion RP80x200/Roll paper 80 x 200 mm: "<</PageSize[204.3 566.9]/ImagingBBox null>>setpagedevice"
*PageRegion RP80x2000/Roll paper 80 x 2000 mm: "<</PageSize[204.3 5669.3]/ImagingBBox null>>setpagedevice"
*PageRegion RP58x200/Roll paper 58 x 200 mm: "<</PageSize[149.1 566.9]/ImagingBBox null>>setpagedevice"
*PageRegion RP58x2000/Roll paper 58 x 2000 mm: "<</PageSize[149.1 5669.3]/ImagingBBox null>>setpagedevice"
*CloseUI: *PageRegion

*DefaultImageableArea: RP80x200
*ImageableArea RP80x200/Roll paper 80 x 200 mm: "0.0 0.0 204.3 566.9"
*ImageableArea RP80x2000/Roll paper 80 x 2000 mm: "0.0 0.0 204.3 5669.3"
*ImageableArea RP58x200/Roll paper 58 x 200 mm: "0.0 0.0 149.1 566.9"
*ImageableArea RP58x2000/Roll paper 58 x 2000 mm: "0.0 0.0 149.1 5669.3"

*DefaultPaperDimension: RP80x200
*PaperDimension RP80x200/Roll paper 80 x 200 mm: "204.3 566.9"
*PaperDimension RP80x2000/Roll paper 80 x 2000 mm: "204.3 5669.3"
*PaperDimension RP58x200/Roll paper 58 x 200 mm: "149.1 566.9"
*PaperDimension RP58x2000/Roll paper 58 x 2000 mm: "149.1 5669.3"

*% Custom page size settings.
*MaxMediaWidth: "204.3"
*MaxMediaHeight: "5669.3"
*NonUIOrderDependency: 100 AnySetup *CustomPageSize
*CustomPageSize True: "pop pop pop <</PageSize [ 5 -2 roll ]/ImagingBBox null>>setpagedevice"
*ParamCustomPageSize Width: 1 points 80 204.3
*ParamCustomPageSize Height: 2 points 80 5669.3
*ParamCustomPageSize WidthOffset:  3 points 0 0
*ParamCustomPageSize HeightOffset: 4 points 0 0
*ParamCustomPageSize Orientation:  5 int 0 0

*% Resolution settings.
*OpenUI *Resolution/Resolution: PickOne
*OrderDependency: 20 AnySetup *Resolution
*DefaultResolution: 203x203dpi
*Resolution 203x203dpi/203 x 203 dpi: "<</HWResolution[203 203]/cupsRowCount 24/cupsBitsPerColor 1>>setpagedevice"
*CloseUI: *Resolution

*% Horizontal and Vertical motion units.
*TmxMotionUnitHori: "203"
*TmxMotionUnitVert: "203"

*% Paper reduction settings.
*OpenUI *TmxPaperReduction/Paper Reduction: PickOne
*OrderDependency: 30 AnySetup *TmxPaperReduction
*DefaultTmxPaperReduction: Both
*TmxPaperReduction Off/None: ""
*TmxPaperReduction Top/Top: ""
*TmxPaperReduction Bottom/Bottom: ""
*TmxPaperReduction Both/Top & Bottom: ""
*CloseUI: *TmxPaperReduction

*% Buzzer / Cash Drawer settings.
*OpenUI *TmxBuzzerAndDrawer/Buzzer/ Cash Drawer: PickOne
*OrderDependency: 30 AnySetup *TmxBuzzerAndDrawer
*DefaultTmxBuzzerAndDrawer: NotUsed
*TmxBuzzerAndDrawer NotUsed/Not used: ""
*TmxBuzzerAndDrawer InternalBuzzer/Internal buzzer: ""
*TmxBuzzerAndDrawer ExternalBuzzer/External buzzer: ""
*TmxBuzzerAndDrawer OpenDrawer1/Open drawer #1: ""
*TmxBuzzerAndDrawer OpenDrawer2/Open drawer #2: ""
*CloseUI: *TmxBuzzerAndDrawer

*% Paper source settings.
*OpenUI *TmxPaperCut/Paper Cut: PickOne
*OrderDependency: 30 AnySetup *TmxPaperCut
*DefaultTmxPaperCut: CutPerJob
*TmxPaperCut NoCut/No cut: ""
*TmxPaperCut CutPerJob/Cut per job: ""
*TmxPaperCut CutPerPage/Cut per page: ""
*CloseUI: *TmxPaperCut

*CloseGroup: General

*% End
Marco avatar
br flag
can you add the content of the file "/etc/cups/printers.conf" to the question?
French Noodles avatar
aq flag
@Marco Done! I eddited the question do add the file
French Noodles avatar
aq flag
Is anyone still here? I still need help with this
Marco avatar
br flag
my hope was an obvious wrong entry in "printers.conf". Maybe you can change the setting with `lpoptions` command, see `man lpoptions`. But I have no idea how to view the changeable printer specific options. You have to do "trial&error"
French Noodles avatar
aq flag
`lpoptions -l` shows me this: PageSize/Media Size: *RP80x200 RP80x2000 RP58x200 RP58x2000 Custom.WIDTHxHEIGHT Which is weird since that's the size that I want which isnt in the case on the dashboard for the printer
French Noodles avatar
aq flag
Is anyone still here? I still need help with this
Score:0
it flag

From my reading of https://ubuntu.com/server/docs/service-cups, you’ll need to restart the CUPS server by typing the following command at a terminal prompt:

sudo systemctl restart cups.service 

SysAdmin Hint: All print jobs printing, on any printer, at the time of the restart will be reprinted from Page 1.

French Noodles avatar
aq flag
That didn't work for me, the settings are still as I mentioned in the question I'm not quite sure why restarting will fix it
waltinator avatar
it flag
Maybe it doesn't like your `.ppd`? `service cups status`? `sudo journalctl -b 0 -u cups`? Please [edit] your question to add whatever information you get. Don't use Add Comment.
French Noodles avatar
aq flag
Done, I added the .ppd file, the service status, and the logs, but it all seems fine to me, I think its also accepting the ppd file, the only issue is the default settings wont use 80mm but rather is set to 72mm but I'm not sure what file is causing that, considering everything I saw is pointing towards it printing at 80mm
waltinator avatar
it flag
Your picture of the server status, while showing the nifty green text, omits the complete log. Text is better.
waltinator avatar
it flag
Read `man cupsd.conf` and increase your `LogLevel` to get more information. Do not post whole verbose logs. Logvomit isn't heloful. It really looks like it's using a different `.ppd` file. Check location, ownership, permissions of your `.ppd` file.
French Noodles avatar
aq flag
Why and how would it use a different ppd file, I mean if it did that in the first place I wouldnt get the options to cut the receipt or open the cashbox, I think its the correct one Also Im not sure how to change this loglevel
French Noodles avatar
aq flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/147135/discussion-between-french-noodles-and-waltinator).
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.