Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-release-src > by-pkgid > 2c101d732df8a963b38a7c700d61af5a > files > 35

hplip-3.11.3a-5.mga1.src.rpm

#! /bin/sh /usr/share/dpatch/dpatch-run
## pjl-duplex-binding.dpatch by  <till.kamppeter@gmail.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: https://bugs.launchpad.net/hplip/+bug/244295

@DPATCH@
diff -urNad hplip-2.8.7~/prnt/hpijs/ljcolor.cpp hplip-2.8.7/prnt/hpijs/ljcolor.cpp
--- hplip-2.8.7~/prnt/hpijs/ljcolor.cpp	2008-07-30 18:44:30.000000000 +0200
+++ hplip-2.8.7/prnt/hpijs/ljcolor.cpp	2008-09-23 13:17:01.000000000 +0200
@@ -325,6 +325,19 @@
 
     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 -urNad hplip-2.8.7~/prnt/hpijs/ljjetready.cpp hplip-2.8.7/prnt/hpijs/ljjetready.cpp
--- hplip-2.8.7~/prnt/hpijs/ljjetready.cpp	2008-07-30 18:44:30.000000000 +0200
+++ hplip-2.8.7/prnt/hpijs/ljjetready.cpp	2008-09-23 13:17:01.000000000 +0200
@@ -324,6 +324,17 @@
     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 -urNad hplip-2.8.7~/prnt/hpijs/ljmono.cpp hplip-2.8.7/prnt/hpijs/ljmono.cpp
--- hplip-2.8.7~/prnt/hpijs/ljmono.cpp	2008-07-30 18:44:30.000000000 +0200
+++ hplip-2.8.7/prnt/hpijs/ljmono.cpp	2008-09-23 13:17:01.000000000 +0200
@@ -207,6 +207,19 @@
     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;