CUPS 打印机默认设置不被遵守,Ubuntu 服务器

CUPS 打印机默认设置不被遵守,Ubuntu 服务器

我正在使用 Ubuntu 服务器作为网络中设备的打印机服务器,它使用 CUPS 连接到 TM-T20X(收据热敏打印机)并在网络中共享它,除了一个问题外,一切都按预期工作,而打印收据的大小如下72 毫米,不是 80 毫米,检查打印机默认值时,它确实显示 80mm,检查 ppd 文件时,它也显示 80mm,(我使用的是Epson 官方驱动程序)。

但是,正如您在屏幕截图中看到的,它显示为 72mm,这在 ppd 文件中甚至没有提到,并且在打印时我得到的是 52mm 或 72mm 的选项,但从来没有 80mm。我不确定我可以在哪里更改这些默认选项。

屏幕截图显示默认设置为“72”:

屏幕截图显示默认设置为“72”

屏幕截图显示我将默认值设置为“80”:

屏幕截图显示我将默认值设置为“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

它给出了我想要的正确值,但实际值并未被使用。

这里是/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

答案1

从我读到的https://ubuntu.com/server/docs/service-cups,您需要通过在终端提示符下输入以下命令来重新启动 CUPS 服务器:

sudo systemctl restart cups.service 

系统管理员提示:重新启动时,任何打印机上打印的所有打印作业都将从第 1 页重新打印。

相关内容