Package: hplip / 3.14.6-1+deb8u1

pjl-duplex-binding.dpatch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#! /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@
Index: hplip-3.12.4/prnt/hpijs/ljcolor.cpp
===================================================================
--- hplip-3.12.4.orig/prnt/hpijs/ljcolor.cpp	2012-04-10 18:39:32.000000000 +1000
+++ hplip-3.12.4/prnt/hpijs/ljcolor.cpp	2012-05-26 10:21:29.000000000 +1000
@@ -330,6 +330,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;
Index: hplip-3.12.4/prnt/hpijs/ljjetready.cpp
===================================================================
--- hplip-3.12.4.orig/prnt/hpijs/ljjetready.cpp	2012-04-10 18:39:32.000000000 +1000
+++ hplip-3.12.4/prnt/hpijs/ljjetready.cpp	2012-05-26 10:21:29.000000000 +1000
@@ -329,6 +329,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;
Index: hplip-3.12.4/prnt/hpijs/ljmono.cpp
===================================================================
--- hplip-3.12.4.orig/prnt/hpijs/ljmono.cpp	2012-04-10 18:39:32.000000000 +1000
+++ hplip-3.12.4/prnt/hpijs/ljmono.cpp	2012-05-26 10:21:29.000000000 +1000
@@ -212,6 +212,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;