diff -Naur hplip-3.22.6/data/models/models.dat hplip-3.22.6.sp1/data/models/models.dat --- hplip-3.22.6/data/models/models.dat 2022-06-23 06:56:29.000000000 +0200 +++ hplip-3.22.6.sp1/data/models/models.dat 2022-07-24 10:39:57.908155121 +0200 @@ -18141,7 +18141,7 @@ support-ver=0.9.5 tech-class=LJMono family-class=LJ-Class6 -tech-subclass=Normal +tech-subclass=CenterAligned tech-type=3 usb-pid=0 usb-vid=3f0 @@ -18224,7 +18224,7 @@ support-ver=0.9.5 tech-class=LJMono family-class=LJ-Class6 -tech-subclass=Normal +tech-subclass=CenterAligned tech-type=3 usb-pid=0 usb-vid=3f0 @@ -18467,7 +18467,7 @@ support-ver=0.9.5 tech-class=LJMono family-class=LJ-Class6 -tech-subclass=Normal +tech-subclass=CenterAligned tech-type=3 usb-pid=0 usb-vid=3f0 diff -Naur hplip-3.22.6/Normalize.cpp hplip-3.22.6.sp1/Normalize.cpp --- hplip-3.22.6/Normalize.cpp 2022-06-23 06:56:29.000000000 +0200 +++ hplip-3.22.6.sp1/Normalize.cpp 2022-07-24 10:39:57.908155121 +0200 @@ -119,7 +119,8 @@ "Mono_Duplex", "AutoDuplex", "K10", - "CuHdIPH" + "CuHdIPH", + "CenterAligned" }; /** string array of shortening replacements */ diff -Naur hplip-3.22.6/Normalize.h hplip-3.22.6.sp1/Normalize.h --- hplip-3.22.6/Normalize.h 2022-06-23 06:56:29.000000000 +0200 +++ hplip-3.22.6.sp1/Normalize.h 2022-07-24 10:39:57.908155121 +0200 @@ -6,7 +6,7 @@ #define MAX_TECH_CLASS_PDL 67 #define MAX_TECH_CLASS 77 #define MAX_FAMILY_CLASS 54 -#define MAX_SUB_CLASS 32 +#define MAX_SUB_CLASS 33 #define COLOR "Color" diff -Naur hplip-3.22.6/prnt/drv/hpcups.drv.in.template hplip-3.22.6.sp1/prnt/drv/hpcups.drv.in.template --- hplip-3.22.6/prnt/drv/hpcups.drv.in.template 2022-06-23 06:56:29.000000000 +0200 +++ hplip-3.22.6.sp1/prnt/drv/hpcups.drv.in.template 2022-07-24 10:39:57.908155121 +0200 @@ -13750,6 +13750,12 @@ Choice "Draft/Draft (Economy)" "<>setpagedevice" Choice "Best/Best" "<>setpagedevice" + /* Dummy option to handle the center-aligned paper guide feature of the + LaserJet 1100 family */ + Option "PaperAlignment/Paper Alignment" PickOne AnySetup 10.0 + *Choice "Left" "" + Choice "Center" "<>setpagedevice" + // Duplexer is optional... Installable "OptionDuplex/Duplexer Installed" @@ -13825,11 +13831,19 @@ MinSize 1in 4in MaxSize 8.5in 14in - // <%LJMono:Normal%> { + UIConstraints "*PaperAlignment Center *MediaType" + // <%LJMono:Normal%> + } + { + UIConstraints "*PaperAlignment Center *MediaType" UIConstraints "*OutputMode Best *MediaType" // <%LJMono:300dpiOnly%> } + { + UIConstraints "*PaperAlignment Left *MediaType" + // <%LJMono:CenterAligned%> + } } // End Supported media sizes. { diff -Naur hplip-3.22.6/prnt/hpcups/Encapsulator.cpp hplip-3.22.6.sp1/prnt/hpcups/Encapsulator.cpp --- hplip-3.22.6/prnt/hpcups/Encapsulator.cpp 2022-06-23 06:56:29.000000000 +0200 +++ hplip-3.22.6.sp1/prnt/hpcups/Encapsulator.cpp 2022-07-24 10:39:57.908155121 +0200 @@ -255,6 +255,14 @@ addToHeader((const BYTE *) szStr, 20); } + top_margin = m_pMA->printable_start_y - ((m_pJA->mech_offset * m_pQA->actual_vertical_resolution)/1000); + int left_margin = 0; + if (m_pJA->integer_values[1] > 0) + { + left_margin = ((m_pJA->integer_values[1] * m_pQA->horizontal_resolution) / 100 - m_pMA->printable_width) / 2; + } + addToHeader("\x1b*p%dx%dY", left_margin, top_margin); + const BYTE *pgrafMode = grafMode2; if (m_pJA->color_mode == 0) { @@ -266,14 +274,6 @@ addToHeader((const BYTE *) pgrafMode, 5); addToHeader((const BYTE *) seedSame, sizeof(seedSame)); - top_margin = m_pMA->printable_start_y - ((m_pJA->mech_offset * m_pQA->actual_vertical_resolution)/1000); - int left_margin = 0; - if (m_pJA->integer_values[1] > 0) - { - left_margin = ((m_pJA->integer_values[1] * m_pQA->horizontal_resolution) / 100 - m_pMA->printable_width) / 2; - } - addToHeader("\x1b*p%dx%dY", left_margin, top_margin); - return; }