2192912 - [Utax, Kyocera, Brother] pdftops hacks are not applied due missing manufacturer in printer-make-and-model
This commit is contained in:
parent
2672a39650
commit
503929c9a0
@ -0,0 +1,37 @@
|
||||
From 62d43bb80f8ce5eeae0c71d081532a0be9ff2983 Mon Sep 17 00:00:00 2001
|
||||
From: Zdenek Dohnal <zdohnal@redhat.com>
|
||||
Date: Fri, 26 May 2023 14:05:00 +0200
|
||||
Subject: [PATCH] ppd/ppd-ipp.c: Use make when constructing printer-make-model
|
||||
attr
|
||||
|
||||
We used only PPD Nickname which does not contain manufacturer in some
|
||||
drivers (like Utax) when constructing printer-make-and-model IPP
|
||||
attribute, and then used the attribute when matching with strings
|
||||
representing manufacturers in filter functions.
|
||||
|
||||
This caused internal hacks for specific printer manufacturers weren't
|
||||
applied, causing breakage during printing.
|
||||
---
|
||||
ppd/ppd-ipp.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/ppd/ppd-ipp.c b/ppd/ppd-ipp.c
|
||||
index 59556242..374e8a8e 100644
|
||||
--- a/ppd/ppd-ipp.c
|
||||
+++ b/ppd/ppd-ipp.c
|
||||
@@ -1381,8 +1381,11 @@ ppdLoadAttributes(
|
||||
}
|
||||
|
||||
// printer-make-andXS-model
|
||||
+ char make_model[128]; // Manufacturer and Model value
|
||||
+
|
||||
+ snprintf(make_model, sizeof(make_model), "%s %s", ppd->manufacturer, ppd->nickname);
|
||||
ippAddString(attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-make-and-model",
|
||||
- NULL, ppd->nickname);
|
||||
+ NULL, make_model);
|
||||
|
||||
// printer-resolution-default
|
||||
ippAddResolution(attrs, IPP_TAG_PRINTER, "printer-resolution-default",
|
||||
--
|
||||
2.40.1
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
Name: libppd
|
||||
Epoch: 1
|
||||
Version: 2.0~rc1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Library for retro-fitting legacy printer drivers
|
||||
|
||||
# the CUPS exception text is the same as LLVM exception, so using that name with
|
||||
@ -22,6 +22,8 @@ Source0: %{URL}/releases/download/%{upstream_version}/%{name}-%{upstream_
|
||||
# Patches
|
||||
# https://github.com/OpenPrinting/libppd/pull/18
|
||||
Patch0001: libppd-disable-testppdfile.patch
|
||||
# https://github.com/OpenPrinting/libppd/pull/21
|
||||
Patch0002: 0001-ppd-ppd-ipp.c-Use-make-when-constructing-printer-mak.patch
|
||||
|
||||
|
||||
# for autogen.sh
|
||||
@ -194,6 +196,9 @@ rm -rf %{buildroot}%{_datadir}/ppdc
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Mon May 29 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-2
|
||||
- 2192912 - [Utax, Kyocera, Brother] pdftops hacks are not applied due missing manufacturer in printer-make-and-model
|
||||
|
||||
* Thu Apr 27 2023 Zdenek Dohnal <zdohnal@redhat.com> - 1:2.0~rc1-1
|
||||
- 2.0rc1
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user