Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37507167
en ru br
Репозитории ALT
S:3.23.8-alt1
5.1: 3.11.5-alt0.M51.1
4.1: 2.8.10-alt2.M41.1
4.0: 2.7.12-alt2.M40.1
+backports:2.8.10-alt2.M40.1
3.0:
+backports:1.6.6a-alt0.M30.4.1
www.altlinux.org/Changes

Группа :: Издательство
Пакет: hplip

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: pjl-duplex-binding.patch
Скачать


From a20e58b494a37d9ece3444101c7fa7a0b14847ce Mon Sep 17 00:00:00 2001
From: Till Kamppeter <till.kamppeter@gmail.com>
Date: Fri, 22 Jul 2016 09:32:54 +0200
Subject: Fixed short-edge duplex for non-PS laser printers
LP: #244295
Patch-Name: pjl-duplex-binding.patch
---
 prnt/hpijs/ljcolor.cpp    | 13 +++++++++++++
 prnt/hpijs/ljjetready.cpp | 11 +++++++++++
 prnt/hpijs/ljmono.cpp     | 13 +++++++++++++
 3 files changed, 37 insertions(+)
diff --git a/prnt/hpijs/ljcolor.cpp b/prnt/hpijs/ljcolor.cpp
index 0ecbfc606..db35e9819 100644
--- a/prnt/hpijs/ljcolor.cpp
+++ b/prnt/hpijs/ljcolor.cpp
@@ -330,6 +330,19 @@ DRIVER_ERROR HeaderLJColor::StartSend ()
 
     err = thePrinter->Send ((const BYTE *) res, strlen (res));
 
+//  Binding directive
+
+    strcpy (res, "@PJL SET BINDING=LONGEDGE\015\012");
+
+#ifdef APDK_AUTODUPLEX
+    if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
+    {
+        strcpy (res, "@PJL SET BINDING=SHORTEDGE\015\012");
+    }
+#endif
+
+    err = thePrinter->Send ((const BYTE *) res, strlen (res));
+
 
     err = thePrinter->Send ((const BYTE*) EnterLanguage, sizeof (EnterLanguage));
     ERRCHECK;
diff --git a/prnt/hpijs/ljjetready.cpp b/prnt/hpijs/ljjetready.cpp
index 6942d2992..d79d40932 100644
--- a/prnt/hpijs/ljjetready.cpp
+++ b/prnt/hpijs/ljjetready.cpp
@@ -329,6 +329,17 @@ DRIVER_ERROR HeaderLJJetReady::StartSend ()
     err = thePrinter->Send ((const BYTE *) szScratchStr, strlen (szScratchStr));
     ERRCHECK;
 
+    // Send the Binding command
+    strcpy (szScratchStr, "@PJL SET BINDING=LONGEDGE\015\012");
+#ifdef APDK_AUTODUPLEX
+    if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
+    {
+        strcpy (szScratchStr, "@PJL SET BINDING=SHORTEDGE\015\012");
+    }
+#endif
+    err = thePrinter->Send ((const BYTE *) szScratchStr, strlen (szScratchStr));
+    ERRCHECK;
+
     //Set the resolution to 600
     err = thePrinter->Send ((const BYTE*)ccpPJLSetRes,sizeof(ccpPJLSetRes));
     ERRCHECK;
diff --git a/prnt/hpijs/ljmono.cpp b/prnt/hpijs/ljmono.cpp
index 67a0077d6..8d3ad4dab 100644
--- a/prnt/hpijs/ljmono.cpp
+++ b/prnt/hpijs/ljmono.cpp
@@ -212,6 +212,19 @@ DRIVER_ERROR HeaderLJMono::StartSend ()
     err = thePrinter->Send ((const BYTE *) res, strlen (res));
     ERRCHECK;
 
+//  Binding directive
+
+    strcpy (res, "@PJL SET BINDING=LONGEDGE\015\012");
+
+#ifdef APDK_AUTODUPLEX
+    if (thePrintContext->QueryDuplexMode () == DUPLEXMODE_TABLET)
+    {
+        strcpy (res, "@PJL SET BINDING=SHORTEDGE\015\012");
+    }
+#endif
+    err = thePrinter->Send ((const BYTE *) res, strlen (res));
+    ERRCHECK;
+
     err = thePrinter->Send ((const BYTE*) EnterLanguage, sizeof (EnterLanguage));
     ERRCHECK;
 
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin