From 3d75af281e458c26fcf32ed14676bcd85e611a45 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Sun, 28 Dec 2025 21:46:29 +0300 Subject: [PATCH 1/2] Generate proper make-and-model for CUPS web interface usb.c has the following description: `direct usb:/make/model?serial=foo "Make Model" "USB Printer"` That's why first should go raw Make and Model, and then the user-visible description with (captusb). Otherwise it could not be used for PPD model matching. --- captbackend/Core/PrinterInfo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/captbackend/Core/PrinterInfo.cpp b/captbackend/Core/PrinterInfo.cpp index eccec92..1276d92 100644 --- a/captbackend/Core/PrinterInfo.cpp +++ b/captbackend/Core/PrinterInfo.cpp @@ -107,8 +107,8 @@ void PrinterInfo::Report(std::ostream& stream) const { // so that backends can be distinguished in the CUPS web UI. stream << "direct "; // device-class this->WriteUri(stream) << ' '; // uri - stream << '"' << this->Manufacturer << ' ' << this->Model << " (" CAPTBACKEND_NAME ")\" "; // device-make-and-model/description - stream << '"' << this->Manufacturer << ' ' << this->Model << '"' << ' '; // device-info/name + stream << '"' << this->Manufacturer << ' ' << this->Model << '"' << ' '; // device-make-and-model + stream << '"' << this->Manufacturer << ' ' << this->Model << "(" CAPTBACKEND_NAME ")\" "; // device-info/name stream << '"' << this->DeviceId << '"'; // device-id stream << " \"\""; // device-location stream << std::endl; From f6f2ae771c579327b83cda939aa5e7ebf5515898 Mon Sep 17 00:00:00 2001 From: ValdikSS Date: Sun, 28 Dec 2025 21:47:40 +0300 Subject: [PATCH 2/2] Update PPD NickNames for model matching It seems that CUPS web interface uses only NickName as "make and model" to match the preferred PPD file, that's why it's crucial to have it exactly as the USB make and model (partial match from the start is suppored). --- ppd/captppd.drv | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ppd/captppd.drv b/ppd/captppd.drv index f57c64f..376afbe 100644 --- a/ppd/captppd.drv +++ b/ppd/captppd.drv @@ -57,24 +57,24 @@ Option "cupsHalftoneType/Dithering type" PickOne AnySetup 40 #endif { - ModelName "LBP800" - Attribute "NickName" "" "Canon LBP800, captppd $CAPTBACKEND_VERSION" + ModelName "LBP-800" + Attribute "NickName" "" "Canon LBP-800, captppd $CAPTBACKEND_VERSION" Throughput 8 Attribute "1284DeviceID" "" "MFG:Canon;MDL:LBP-800;CMD:CAPT;VER:1.0;CLS:PRINTER;DES:Canon LBP-800" // assumed from LBP810 PCFileName "LBP800CAPTPPD.ppd" } { - ModelName "LBP810" - Attribute "NickName" "" "Canon LBP810, captppd $CAPTBACKEND_VERSION" + ModelName "LBP-810" + Attribute "NickName" "" "Canon LBP-810, captppd $CAPTBACKEND_VERSION" Throughput 8 Attribute "1284DeviceID" "" "MFG:Canon;MDL:LBP-810;CMD:CAPT;VER:1.0;CLS:PRINTER;DES:Canon LBP-810" PCFileName "LBP810CAPTPPD.ppd" } { - ModelName "LBP1120" - Attribute "NickName" "" "Canon LBP1120, captppd $CAPTBACKEND_VERSION" + ModelName "LASER SHOT LBP-1120" + Attribute "NickName" "" "Canon LASER SHOT LBP-1120, captppd $CAPTBACKEND_VERSION" Throughput 10 Attribute "1284DeviceID" "" "MFG:Canon;MDL:LASER SHOT LBP-1120;CMD:CAPT;VER:1.0;CLS:PRINTER;DES:Canon LASER SHOT LBP-1120" PCFileName "LBP1120CAPTPPD.ppd"