You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu Server下CUPS打印机EPSON TM-T20X默认纸张尺寸设置不生效问题排查求助

Ubuntu Server下CUPS打印机EPSON TM-T20X默认纸张尺寸设置不生效问题排查求助

我目前在Ubuntu服务器上搭建了CUPS打印服务器,用来给局域网内的设备共享EPSON TM-T20X热敏小票打印机,整体功能都正常,唯独遇到一个头疼的问题——打印出来的小票尺寸始终是72mm,而不是我想要的80mm。

我已经检查过以下几个地方:

  • 打印机的默认设置里明明显示的是80mm;
  • 对应的PPD文件(用的是EPSON官方驱动)里也明确配置了80mm的纸张选项;

但实际情况却很矛盾:

  • 从截图里能看到,实际生效的默认尺寸是72mm,而且这个72mm在PPD文件里根本没提到;
  • 打印的时候可选的尺寸只有52mm和72mm,完全找不到80mm的选项。

我实在搞不清该在哪里修改这个默认选项,麻烦大家帮我看看问题出在哪。

相关截图说明

  • 截图1:显示默认设置为“72”
  • 截图2:显示我手动设置默认为“80”

命令输出信息

运行lpoptions -l得到的结果:

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

这里显示我想要的80mm选项(RP80x200)被标记为默认,但实际打印时根本不生效。

/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>

对应的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

备注:内容来源于stack exchange,提问作者French Noodles

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.22 07:25:29