I am uploading a NMU to DELAYED/10 in order to fix this.
The debdiff is attached. The merge request needs changes.
diff -Nru brlaser-6/.github/ISSUE_TEMPLATE/bug_report.md 
brlaser-6.2.6/.github/ISSUE_TEMPLATE/bug_report.md
--- brlaser-6/.github/ISSUE_TEMPLATE/bug_report.md      1970-01-01 
00:00:00.000000000 +0000
+++ brlaser-6.2.6/.github/ISSUE_TEMPLATE/bug_report.md  2023-08-02 
02:07:30.000000000 +0000
@@ -0,0 +1,47 @@
+---
+name: Bug report
+about: Create a report to help us improve
+title: "[BUG]"
+labels: ''
+assignees: ''
+
+---
+
+<!--
+PLEASE FILL THIS TEMPLATE TO MAKE YOUR REPORT MORE HELPFUL FOR THE DEVELOPER!!
+
+NOTE:
+ - Color Printers are not supported
+ - Ink-jet Printers are not supported
+ - Label Printers are not supported
+-->
+
+**Describe the bug**
+A clear and concise description of what the bug is.
+
+**Steps to Reproduce**
+1. Go to '...'
+2. Click on '....'
+3. Scroll down to '....'
+4. See error
+
+**Current behavior**
+A clear and concise description of what is currently happening.
+
+**Expected behavior**
+A clear and concise description of what you expected to happen.
+
+**Screenshots**
+If applicable, add screenshots to help explain your problem.
+
+**Terminal Output**
+````
+IF APPLICABLE, PASTE CODE OUTPUT HERE
+````
+
+**Desktop:**
+ - Operating System:
+ - brlaser Version:
+
+**Additional context**
+Add any other context about the problem here.
diff -Nru brlaser-6/.github/ISSUE_TEMPLATE/feature_request.md 
brlaser-6.2.6/.github/ISSUE_TEMPLATE/feature_request.md
--- brlaser-6/.github/ISSUE_TEMPLATE/feature_request.md 1970-01-01 
00:00:00.000000000 +0000
+++ brlaser-6.2.6/.github/ISSUE_TEMPLATE/feature_request.md     2023-08-02 
02:07:30.000000000 +0000
@@ -0,0 +1,20 @@
+---
+name: Feature request
+about: Suggest an idea for this project
+title: ''
+labels: enhancement
+assignees: ''
+
+---
+
+**Is your feature request related to a problem?**
+A clear and concise description of what the problem is.
+
+**Describe the solution you'd like**
+A clear and concise description of what you want to happen.
+
+**Describe alternatives you've considered**
+A clear and concise description of any alternative solutions or features 
you've considered.
+
+**Additional context**
+Add any other context or screenshots about the feature request here.
diff -Nru brlaser-6/.github/ISSUE_TEMPLATE/report-compatible-printer.md 
brlaser-6.2.6/.github/ISSUE_TEMPLATE/report-compatible-printer.md
--- brlaser-6/.github/ISSUE_TEMPLATE/report-compatible-printer.md       
1970-01-01 00:00:00.000000000 +0000
+++ brlaser-6.2.6/.github/ISSUE_TEMPLATE/report-compatible-printer.md   
2023-08-02 02:07:30.000000000 +0000
@@ -0,0 +1,29 @@
+---
+name: Report Compatible Printer
+about: Report a printer that has been verified as compatible
+title: "[Compatible]"
+labels: Verified Compatible
+assignees: ''
+
+---
+
+<!--
+TO MAKE YOUR REPORT MORE HELPFUL, PLEASE FILL IN THIS TEMPLATE
+-->
+
+**Printer Entry**: <!-- sudo lpinfo --include-schemes usb -l -v -->
+````
+INSERT TERMINAL OUTPUT HERE
+````
+
+**Verified**: <!-- please mark [x] what you have tested -->
+- [ ] test page printed
+- [ ] test page printed
+- [ ] tested 300dpi
+- [ ] tested 600dpi
+- [ ] tested 1200dpi
+- [ ] texted simplex <!-- single-sided printing -->
+- [ ] tested duplex  <!-- if applicable -->
+
+**Additional notes**:
+Add any notes such as unexpected behavior, or possible issues.
diff -Nru brlaser-6/.github/workflows/build.yml 
brlaser-6.2.6/.github/workflows/build.yml
--- brlaser-6/.github/workflows/build.yml       1970-01-01 00:00:00.000000000 
+0000
+++ brlaser-6.2.6/.github/workflows/build.yml   2023-08-02 02:07:30.000000000 
+0000
@@ -0,0 +1,39 @@
+name: build
+on: [ push, pull_request ]
+jobs:
+  linux:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        compiler: [ clang++, gcc++ ]
+    steps:
+      - name: Add repository
+        run: sudo apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
+      - name: Install packages
+        run: sudo apt install libcups2-dev
+      - uses: actions/checkout@v3
+      - name: Configure
+        run: cmake .
+      - name: Make
+        run: make
+        env:
+          CXX: ${{ matrix.compiler }}
+      - name: Run tests
+        run: make check
+  macos:
+    runs-on: macos-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        compiler: [ clang++, gcc++ ]
+    steps:
+      - uses: actions/checkout@v3
+      - name: Configure
+        run: cmake .
+      - name: Make
+        run: make
+        env:
+          CXX: ${{ matrix.compiler }}
+      - name: Run tests
+        run: make check
diff -Nru brlaser-6/CMakeLists.txt brlaser-6.2.6/CMakeLists.txt
--- brlaser-6/CMakeLists.txt    2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/CMakeLists.txt        2023-08-02 02:07:30.000000000 +0000
@@ -39,10 +39,11 @@
 # Compiler warnings
 extra_cxx_compiler_flag("-Wall")
 extra_cxx_compiler_flag("-Wno-missing-braces")
-# Some security flags
+extra_cxx_compiler_flag("-Wdate-time")
+# Some hardening flags
 extra_cxx_compiler_flag("-fstack-protector-strong")
 extra_cxx_compiler_flag("-Wformat")
-extra_cxx_compiler_flag("-Werror=format-security")
+extra_cxx_compiler_flag("-Wformat -Werror=format-security")
 extra_cxx_compiler_flag("-D_FORTIFY_SOURCE=2")
 # Enable the supported flags, but give priority to CXXFLAGS env var
 set(CMAKE_CXX_FLAGS "${EXTRA_CXX_FLAGS} ${CMAKE_CXX_FLAGS}")
@@ -116,15 +117,17 @@
 add_executable(test_lest test/test_lest.cc)
 add_executable(test_line test/test_line.cc src/line.cc)
 add_executable(test_block test/test_block.cc)
+add_executable(test_job test/test_job.cc src/job.cc src/line.cc)
 
 enable_testing()
 add_test(test_lest test_lest)
 add_test(test_line test_line)
 add_test(test_block test_block)
+add_test(test_job test_job)
 
 # Autotools-style "make check" command
 add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
-add_dependencies(check test_lest test_line test_block)
+add_dependencies(check test_lest test_line test_block test_job)
 
 
 # Installation
diff -Nru brlaser-6/README.md brlaser-6.2.6/README.md
--- brlaser-6/README.md 2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/README.md     2023-08-02 02:07:30.000000000 +0000
@@ -1,91 +1,142 @@
 brlaser: Brother laser printer driver
 =====================================
 
-brlaser is a CUPS driver for Brother laser printers.
+brlaser is an open-source CUPS driver designed specifically for Brother 
monochrome laser printers and multi-function devices.
 
-Although most Brother printers support a standard printer language
-such as PCL or PostScript, not all do. If you have a monochrome
-Brother laser printer (or multi-function device) and the other open
-source drivers don't work, this one might help.
+While most Brother printers can use standard printer languages like PCL or 
PostScript, some models do not. If you have a monochrome Brother laser printer 
(or multi-function device) and the other open-source drivers are not working, 
brlaser might be able to help. Additionally, there have been reports of some 
non-Brother printers working with this driver.
 
-This driver has been reported to work with these printers:
+The software is released under the GNU General Public License, which grants 
the right to freely use, distribute, and modify the program without requiring 
any permission from the software's author or any fees.
+
+
+Supported Printers
+------------------
+The following printers have been reported to work with this driver:
 
 * Brother DCP-1510 series
 * Brother DCP-1600 series
+* Brother DCP-1610W series
+* Brother DCP-7020
 * Brother DCP-7030
 * Brother DCP-7040
 * Brother DCP-7055
 * Brother DCP-7055W
 * Brother DCP-7060D
 * Brother DCP-7065DN
+* Brother DCP-7070DW
 * Brother DCP-7080
+* Brother DCP-7080D
+* Brother DCP-8065DN
 * Brother DCP-L2500D series
+* Brother DCP-L2510D series
 * Brother DCP-L2520D series
+* Brother DCP-L2520DW series
+* Brother DCP-L2537DW
 * Brother DCP-L2540DW series
+* Brother DCP-L2550DW series
+* Brother FAX-2820
+* Brother FAX-2840
 * Brother HL-1110 series
 * Brother HL-1200 series
 * Brother HL-2030 series
+* Brother HL-2130 series
 * Brother HL-2140 series
 * Brother HL-2220 series
+* Brother HL-2230 series
+* Brother HL-2240D series
+* Brother HL-2250DN series
+* Brother HL-2260
 * Brother HL-2270DW series
+* Brother HL-2280DW
 * Brother HL-5030 series
+* Brother HL-5040 series
 * Brother HL-L2300D series
+* Brother HL-L2305 series
+* Brother HL-L2310D series
 * Brother HL-L2320D series
+* Brother HL-L2335D series
 * Brother HL-L2340D series
+* Brother HL-L2350DW series
 * Brother HL-L2360D series
-* Brother MFC-1910W
+* Brother HL-L2370DN series
+* Brother HL-L2375DW series
+* Brother HL-L2380DW series
+* Brother HL-L2390DW
+* Brother HL-L5000D series
+* Brother MFC-1810 series
+* Brother MFC-1910W series
 * Brother MFC-7240
+* Brother MFC-7320
+* Brother MFC-7340
 * Brother MFC-7360N
 * Brother MFC-7365DN
-* Brother MFC-7840W
+* Brother MFC-7420
+* Brother MFC-7440N
+* Brother MFC-7460DN
+* Brother MFC-7860DW
+* Brother MFC-8710DW
+* Brother MFC-8860DN
+* Brother MFC-9160
+* Brother MFC-L2700DN series
+* Brother MFC-L2700DW series
+* Brother MFC-L2710DN series
 * Brother MFC-L2710DW series
-* Lenovo M7605D
+* Brother MFC-L2750DW series
+* Fuji Xerox DocuPrint P265 dw
+* Lenovo LJ2650DN
 
 
-Other printers
---------------
+Installation
+------------
 
-If your printer isn't included in the list above, just try selecting
-any entry marked 'brlaser' and see if it works.
+Some operating systems already ship this driver. This is the case for at least 
Debian, Gentoo, Ubuntu, Raspbian, openSUSE, NixOS, Arch Linux and Guix. 
 
-If it does, please create a new issue here in Github and include the
-output of this command:
+Look for a package named ``printer-driver-brlaser``.
 
-    sudo lpinfo --include-schemes usb -l -v
+You'll also need ``Ghostscript``, in case that's not installed automatically.
 
-Then I'll be able to add a proper entry for your printer.
+Once brlaser is installed, you can add your printer using the usual CUPS 
interface.
 
 
-Installation
-------------
+Testing Other Printers
+----------------------
+
+If your printer is not officially supported, you can try selecting any driver 
marked as ``brlaser`` to test if the driver will work for your printer.
+
+If you are able to successfully print, please open a new issue on Github and 
select "Report Compatible Printer".
+
+When submitting the compatibility report, connect your printer to your 
computer via USB and run the following command:
 
-Some operating systems already ship this driver. This is the case for
-at least Debian, Ubuntu, Raspbian, openSUSE, NixOS and Arch Linux.
-Look for a package named `printer-driver-brlaser`.
+``sudo lpinfo --include-schemes usb -l -v``
 
-You'll also need Ghostscript, in case that's not installed
-automatically.
+Please provide the output of the command so that we can add the proper entry 
for your specific printer model in the driver.
 
-Once brlaser is installed, you can add your printer using the usual
-CUPS interface.
+Example of output:
+````
+Device: uri = usb://Brother/HL-2270DW%20series?serial=000000000000
+        class = direct
+        info = Brother HL-2270DW series
+        make-and-model = Brother HL-2270DW series
+        device-id = MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:HL-2270DW 
series;CLS:PRINTER;CID:Brother Laser Type1;
+        location = 
+````
 
 
 Building from source
 --------------------
 
-To compile brlaser you'll need CMake and the CUPS development packages
-(libcups2-dev, libcupsimage2-dev or similar).
+To compile brlaser from source, you will need to have CMake and the CUPS 
development packages (such as cups-devel, libcups2-dev, or libcupsimage2-dev) 
installed on your system.
 
-Get the code by cloning the git repo <!-- or downloading the [latest
-release] -->. Compile and install with these commands:
+You can get the source code by cloning the Git repository or downloading the 
[latest release](https://github.com/pdewacht/brlaser/releases/latest).
 
-    cmake .
-    make
-    sudo make install
+To compile and install the driver, use the following commands:
 
-It might be needed to restart CUPS after this.
+````
+cmake .
+make
+sudo make install
+````
 
-[latest release]: https://github.com/pdewacht/brlaser/releases/latest
+Note that you may need to restart CUPS before the driver is loaded and ready 
to use.
 
 
 Copyright
diff -Nru brlaser-6/brlaser.drv.in brlaser-6.2.6/brlaser.drv.in
--- brlaser-6/brlaser.drv.in    2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/brlaser.drv.in        2023-08-02 02:07:30.000000000 +0000
@@ -80,7 +80,7 @@
 
 
 {
-  ModelName "DCP-1510"
+  ModelName "DCP-1510 series"
   Attribute "NickName" "" "Brother DCP-1510 series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,XL2HB;MDL:DCP-1510 
series;CLS:PRINTER;CID:Brother Laser Type1;"
   Resolution k 1 0 0 0 "300dpi/300 DPI"
@@ -95,6 +95,21 @@
 }
 
 {
+  ModelName "DCP-1610W series"
+  Attribute "NickName" "" "Brother DCP-1610W series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:DCP-1610W 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  PCFileName "br1610.ppd"
+}
+
+{
+  ModelName "DCP-7020"
+  Attribute "NickName" "" "Brother DCP-7020, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:DCP-7020;CLS:PRINTER;"
+  Resolution k 1 0 0 0 "300dpi/300 DPI"
+  PCFileName "br7020.ppd"
+}
+
+{
   ModelName "DCP-7030"
   Attribute "NickName" "" "Brother DCP-7030, $USING"
   Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:DCP-7030;CLS:PRINTER;"
@@ -139,7 +154,15 @@
   Attribute "NickName" "" "Brother DCP-7065DN, $USING"
   Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:DCP-7065DN;CLS:PRINTER;CID:Brother Laser Type1;"
   Duplex rotated
-  PCFileName "br7065dn.ppd"
+  PCFileName "br7065d.ppd"
+}
+
+{
+  ModelName "DCP-7070DW"
+  Attribute "NickName" "" "Brother DCP-7070DW, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:DCP-7070DW;CLS:PRINTER;CID:Brother Laser 
Type1;"
+  Duplex rotated
+  PCFileName "br7070d.ppd"
 }
 
 {
@@ -158,7 +181,15 @@
 }
 
 {
-  ModelName "DCP-L2500D"
+  ModelName "DCP-8065DN"
+  Attribute "NickName" "" "Brother DCP-8065DN, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:DCP-8065DN;CLS:PRINTER;"
+  Duplex rotated
+  PCFileName "br8065d.ppd"
+}
+
+{
+  ModelName "DCP-L2500D series"
   Attribute "NickName" "" "Brother DCP-L2500D series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:DCP-L2500D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
   Duplex rotated
@@ -166,7 +197,15 @@
 }
 
 {
-  ModelName "DCP-L2520D"
+  ModelName "DCP-L2510D series"
+  Attribute "NickName" "" "Brother DCP-L2510D series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:DCP-L2510D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  Duplex rotated
+  PCFileName "brl2510d.ppd"
+}
+
+{
+  ModelName "DCP-L2520D series"
   Attribute "NickName" "" "Brother DCP-L2520D series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:DCP-L2520D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
   Duplex rotated
@@ -174,15 +213,54 @@
 }
 
 {
-  ModelName "DCP-L2540DW"
+  ModelName "DCP-L2520DW series"
+  Attribute "NickName" "" "Brother DCP-L2520DW series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:DCP-L2520DW 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  Duplex rotated
+  PCFileName "brl2520w.ppd"
+}
+
+{
+  ModelName "DCP-L2537DW"
+  Attribute "NickName" "" "Brother DCP-L2537DW, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP,URF;MDL:DCP-L2537DW;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
+  Duplex rotated
+  PCFileName "brl2537d.ppd"
+}
+
+{
+  ModelName "DCP-L2540DW series"
   Attribute "NickName" "" "Brother DCP-L2540DW series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:DCP-L2540DW 
series;CLS:PRINTER;CID:Brother Laser Type1;"
   Duplex rotated
-  PCFileName "brl2540.ppd"
+  PCFileName "brl2540d.ppd"
 }
 
 {
-  ModelName "HL-1110"
+  ModelName "DCP-L2550DW series"
+  Attribute "NickName" "" "Brother DCP-L2550DW series, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:DCP-L2550DW 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
+  Duplex rotated
+  PCFileName "brl2550d.ppd"
+}
+
+{
+  ModelName "FAX-2820"
+  Attribute "NickName" "" "Brother FAX-2820, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:FAX-2820;CLS:PRINTER;"
+  Resolution k 1 0 0 0 "300dpi/300 DPI"
+  PCFileName "br2820.ppd"
+}
+
+{
+  ModelName "FAX-2840"
+  Attribute "NickName" "" "Brother FAX-2840, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;MFG:Brother;CMD:PJL,HBP;MDL:FAX-2840;CLS:PRINTER;CID:Brother Laser 
Type1;"
+  PCFileName "br2840.ppd"
+}
+
+{
+  ModelName "HL-1110 series"
   Attribute "NickName" "" "Brother HL-1110 series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-1110 
series;CLS:PRINTER;CID:Brother Laser Type3;"
   Resolution k 1 0 0 0 "300dpi/300 DPI"
@@ -190,7 +268,7 @@
 }
 
 {
-  ModelName "HL-1200"
+  ModelName "HL-1200 series"
   Attribute "NickName" "" "Brother HL-1200 series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-1200 
series;CLS:PRINTER;CID:Brother Laser Type3;"
   PCFileName "br1200.ppd"
@@ -204,6 +282,13 @@
 }
 
 {
+  ModelName "HL-2130 series"
+  Attribute "NickName" "" "Brother HL-2130 series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-2130 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  PCFileName "br2130.ppd"
+}
+
+{
   ModelName "HL-2140 series"
   Attribute "NickName" "" "Brother HL-2140 series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-2140 
series;CLS:PRINTER;"
@@ -218,12 +303,50 @@
 }
 
 {
+  ModelName "HL-2230 series"
+  Attribute "NickName" "" "Brother HL-2230 series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-2230 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  PCFileName "br2230.ppd"
+}
+
+{
+  ModelName "HL-2240D series"
+  Attribute "NickName" "" "Brother HL-2240D series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-2240D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  Duplex rotated
+  PCFileName "br2240d.ppd"
+}
+
+{
+  ModelName "HL-2250DN series"
+  Attribute "NickName" "" "Brother HL-2250DN series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:HL-2250DN 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  Duplex rotated
+  PCFileName "br2250d.ppd"
+}
+
+{
+  ModelName "HL-2260"
+  Attribute "NickName" "" "Brother HL-2260, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:HL-2260;CLS:PRINTER;CID:Brother Laser Type1;"
+  PCFileName "br2260.ppd"
+}
+
+{
   ModelName "HL-2270DW series"
   Attribute "NickName" "" "Brother HL-2270DW series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:HL-2270DW 
series;CLS:PRINTER;CID:Brother Laser Type1;"
   Resolution k 1 0 0 0 "300dpi/300 DPI"
   Duplex rotated
-  PCFileName "br2270dw.ppd"
+  PCFileName "br2270d.ppd"
+}
+
+{
+  ModelName "HL-2280DW"
+  Attribute "NickName" "" "Brother HL-2280DW, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:HL-2280DW;CLS:PRINTER;CID:Brother Laser 
Type1;"
+  Duplex rotated
+  PCFileName "br2280d.ppd"
 }
 
 {
@@ -234,7 +357,14 @@
 }
 
 {
-  ModelName "HL-L2300D"
+  ModelName "HL-5040 series"
+  Attribute "NickName" "" "Brother HL-5040 series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:HL-5040 
series;CLS:PRINTER;"
+  PCFileName "br5040.ppd"
+}
+
+{
+  ModelName "HL-L2300D series"
   Attribute "NickName" "" "Brother HL-L2300D series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-L2300D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
   Duplex rotated
@@ -242,7 +372,22 @@
 }
 
 {
-  ModelName "HL-L2320D"
+  ModelName "HL-L2305 series"
+  Attribute "NickName" "" "Brother HL-L2305 series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP,URF;MDL:HL-L2305 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ4,RS300-600,V1.3;"
+  PCFileName "brl2305.ppd"
+}
+
+{
+  ModelName "HL-L2310D series"
+  Attribute "NickName" "" "Brother HL-L2310D series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-L2310D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  Duplex rotated
+  PCFileName "brl2310d.ppd"
+}
+
+{
+  ModelName "HL-L2320D series"
   Attribute "NickName" "" "Brother HL-L2320D series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-L2320D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
   Duplex rotated
@@ -250,7 +395,15 @@
 }
 
 {
-  ModelName "HL-L2340D"
+  ModelName "HL-L2335D series"
+  Attribute "NickName" "" "Brother HL-L2335D series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP;MDL:HL-L2335D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  Duplex rotated
+  PCFileName "brl2335d.ppd"
+}
+
+{
+  ModelName "HL-L2340D series"
   Attribute "NickName" "" "Brother HL-L2340D series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP,URF;MDL:HL-L2340D 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ4,RS300-600,V1.3,DM1;"
   Duplex rotated
@@ -258,7 +411,15 @@
 }
 
 {
-  ModelName "HL-L2360D"
+  ModelName "HL-L2350DW series"
+  Attribute "NickName" "" "Brother HL-L2350DW series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP,URF;MDL:HL-L2350DW 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
+  Duplex rotated
+  PCFileName "brl2350d.ppd"
+}
+
+{
+  ModelName "HL-L2360D series"
   Attribute "NickName" "" "Brother HL-L2360D series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:HL-L2360D 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ4,RS300-600,V1.3,DM1;"
   Duplex rotated
@@ -266,10 +427,57 @@
 }
 
 {
-  ModelName "MFC-1910W"
-  Attribute "NickName" "" "Brother MFC-1910W, $USING"
+  ModelName "HL-L2370DN series"
+  Attribute "NickName" "" "Brother HL-L2370DN series, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:HL-L2370DN 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
+  Duplex rotated
+  PCFileName "brl2370d.ppd"
+}
+
+{
+  ModelName "HL-L2375DW series"
+  Attribute "NickName" "" "Brother HL-L2375DW series, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:HL-L2375DW 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
+  Duplex rotated
+  PCFileName "brl2375d.ppd"
+}
+
+{
+  ModelName "HL-L2380DW series"
+  Attribute "NickName" "" "Brother HL-L2380DW series, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:HL-L2380DW 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ4,RS300-600,V1.3,DM1;"
+  Duplex rotated
+  PCFileName "brl2380d.ppd"
+}
+
+{
+  ModelName "HL-L2390DW"
+  Attribute "NickName" "" "Brother HL-L2390DW, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP,URF;MDL:HL-L2390DW;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
+  Duplex rotated
+  PCFileName "brl2390d.ppd"
+}
+
+{
+  ModelName "HL-L5000D series"
+  Attribute "NickName" "" "Brother HL-L5000D series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:HL-L5000D 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  Duplex rotated
+  PCFileName "brl5000d.ppd"
+}
+
+{
+  ModelName "MFC-1810 series"
+  Attribute "NickName" "" "Brother MFC-1810 series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,XL2HB;MDL:MFC-1810 
series;CLS:PRINTER;CID:Brother Laser Type1;"
+  PCFileName "br1810.ppd"
+}
+
+{
+  ModelName "MFC-1910W series"
+  Attribute "NickName" "" "Brother MFC-1910W series, $USING"
   Attribute "1284DeviceID" "" 
"MFG:Brother;MFG:Brother;CMD:PJL,HBP;MDL:MFC-1910W 
series;CLS:PRINTER;CID:Brother Laser Type1;"
-  PCFileName "br1910w.ppd"
+  PCFileName "br1910.ppd"
 }
 
 {
@@ -280,20 +488,110 @@
 }
 
 {
+  ModelName "MFC-7320"
+  Attribute "NickName" "" "Brother MFC-7320, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:MFC-7320;CLS:PRINTER;"
+  PCFileName "br7320.ppd"
+}
+
+{
+  ModelName "MFC-7340"
+  Attribute "NickName" "" "Brother MFC-7340, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:MFC-7340;CLS:PRINTER;"
+  PCFileName "br7340.ppd"
+}
+
+{
   ModelName "MFC-7360N"
   Attribute "NickName" "" "Brother MFC-7360N, $USING"
   Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:MFC-7360N;CLS:PRINTER;CID:Brother Laser Type1;"
-  PCFileName "br7360n.ppd"
+  PCFileName "br7360.ppd"
 }
 
-
 {
   ModelName "MFC-7365DN"
   Attribute "NickName" "" "Brother MFC-7365DN, $USING"
   Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:MFC-7365DN;CLS:PRINTER;CID:Brother Laser Type1;"
   Resolution k 1 0 0 0 "300dpi/300 DPI"
   Duplex rotated
-  PCFileName "br7365dn.ppd"
+  PCFileName "br7365d.ppd"
+}
+
+{
+  ModelName "MFC-7420"
+  Attribute "NickName" "" "Brother MFC-7420, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:MFC-7420;CLS:PRINTER;"
+  PCFileName "br7420.ppd"
+}
+
+{
+  ModelName "MFC-7440N"
+  Attribute "NickName" "" "Brother MFC-7440N, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:MFC-7440N;CLS:PRINTER;"
+  PCFileName "br7440.ppd"
+}
+
+{
+  ModelName "MFC-7460DN"
+  Attribute "NickName" "" "Brother MFC-7460DN, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,HBP;MDL:MFC-7460DN;CLS:PRINTER;CID:Brother Laser Type1;"
+  Duplex rotated
+  PCFileName "br7460d.ppd"
+}
+
+{
+  ModelName "MFC-7860DW"
+  Attribute "NickName" "" "Brother MFC-7860DW, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:MFC-7860DW;CLS:PRINTER;CID:Brother Laser 
Type1;"
+  Duplex rotated
+  PCFileName "br7860d.ppd"
+}
+
+{
+  ModelName "MFC-8710DW"
+  Attribute "NickName" "" "Brother MFC-8710DW, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:MFC-8710DW;CLS:PRINTER;CID:Brother Laser 
Type2;URF:W8,CP1,IS11-19-4,MT1-3-4-5-8-11,OB10,PQ4,RS300-600-1200,DM1;"
+  Duplex rotated
+  PCFileName "br8710d.ppd"
+}
+
+{
+  ModelName "MFC-8860DN"
+  Attribute "NickName" "" "Brother MFC-8860DN, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL,POSTSCRIPT;MDL:MFC-8860DN;CLS:PRINTER;"
+  Duplex rotated
+  PCFileName "br8860d.ppd"
+}
+
+{
+  ModelName "MFC-9160"
+  Attribute "NickName" "" "Brother MFC-9160, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:HBP,PCL;MDL:MFC-9160;CLS:PRINTER;"
+  PCFileName "br9160.ppd"
+}
+
+{
+  ModelName "MFC-L2700DN series"
+  Attribute "NickName" "" "Brother MFC-L2700DN series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;MDL:MFC-L2700DN 
series;CMD:PJL,HBP,URF;"
+  Duplex rotated
+  PCFileName "brl2700d.ppd"
+}
+
+{
+  ModelName "MFC-L2700DW series"
+  Attribute "NickName" "" "Brother MFC-L2700DW series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP,URF;MDL:MFC-L2700DW 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ4,RS200-300-600,V1.3,DM1;"
+  Duplex rotated
+  PCFileName "brl2700w.ppd"
+}
+
+{
+  ModelName "MFC-L2710DN series"
+  Attribute "NickName" "" "Brother MFC-L2710DN series, $USING"
+  Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP,URF;MDL:MFC-L2710DN 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
+  Duplex rotated
+  PCFileName "brl2710d.ppd"
 }
 
 {
@@ -301,5 +599,29 @@
   Attribute "NickName" "" "Brother MFC-L2710DW series, $USING"
   Attribute "1284DeviceID" "" "MFG:Brother;CMD:PJL,HBP,URF;MDL:MFC-L2710DW 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
   Duplex rotated
-  PCFileName "brl2710.ppd"
+  PCFileName "brl2710w.ppd"
+}
+
+{
+  ModelName "MFC-L2750DW series"
+  Attribute "NickName" "" "Brother MFC-L2750DW series, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Brother;CMD:PJL,PCL,PCLXL,URF;MDL:MFC-L2750DW 
series;CLS:PRINTER;CID:Brother Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ3-4-5,RS300-600-1200,V1.4,DM1;"
+  Duplex rotated
+  PCFileName "brl2750d.ppd"
+}
+
+{
+  ModelName "DocuPrint P265 dw"
+  Attribute "NickName" "" "Fuji Xerox DocuPrint P265 dw, $USING"
+  Attribute "1284DeviceID" "" "MFG:FX;CMD:PJL,PCL,PCLXL,URF;MDL:DocuPrint P265 
dw;CLS:PRINTER;CID:FX Laser 
Type1;URF:W8,CP1,IS4-1,MT1-3-4-5-8,OB10,PQ4,RS300-600,V1.3,DM1;"
+  Duplex rotated
+  PCFileName "fxp265dd d.ppd"
+}
+
+{
+  ModelName "LJ2650DN"
+  Attribute "NickName" "" "Lenovo LJ2650DN, $USING"
+  Attribute "1284DeviceID" "" 
"MFG:Lenovo;CMD:PJL,PCL,PCLXL;MDL:LJ2650DN;CLS:PRINTER;"
+  Duplex rotated
+  PCFileName "lnj2650d.ppd"
 }
diff -Nru brlaser-6/debian/changelog brlaser-6.2.6/debian/changelog
--- brlaser-6/debian/changelog  2022-04-02 15:03:02.000000000 +0000
+++ brlaser-6.2.6/debian/changelog      2024-12-31 13:11:18.000000000 +0000
@@ -1,3 +1,14 @@
+brlaser (6.2.6-0.1) unstable; urgency=medium
+
+  * Non-maintainer upload
+
+  [ QwertyChouskie ]
+  * Update to upstream v6.2.6 (Closes: #1051303)
+  * Remove upstreamed patch 0001-fix-printing-of-documents-with-images.patch
+  * Update upstream repository URLs to new upstream
+
+ -- Bastian Germann <b...@debian.org>  Tue, 31 Dec 2024 13:11:18 +0000
+
 brlaser (6-3) unstable; urgency=medium
 
   * debian/control: add myself to Uploaders:
diff -Nru brlaser-6/debian/control brlaser-6.2.6/debian/control
--- brlaser-6/debian/control    2022-04-02 15:03:02.000000000 +0000
+++ brlaser-6.2.6/debian/control        2024-12-31 13:11:18.000000000 +0000
@@ -11,7 +11,7 @@
 Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/printing-team/brlaser
 Vcs-Git: https://salsa.debian.org/printing-team/brlaser.git
-Homepage: https://github.com/pdewacht/brlaser
+Homepage: https://github.com/Owl-Maintain/brlaser
 Rules-Requires-Root: no
 
 Package: printer-driver-brlaser
diff -Nru brlaser-6/debian/copyright brlaser-6.2.6/debian/copyright
--- brlaser-6/debian/copyright  2022-04-02 15:03:02.000000000 +0000
+++ brlaser-6.2.6/debian/copyright      2024-12-31 13:11:18.000000000 +0000
@@ -1,6 +1,6 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: brlaser
-Source: https://github.com/pdewacht/brlaser
+Source: https://github.com/Owl-Maintain/brlaser
 
 Files: *
 Copyright: 2013, 2014, Peter De Wachter <pdewa...@gmail.com>
diff -Nru 
brlaser-6/debian/patches/0001-fix-printing-of-documents-with-images.patch 
brlaser-6.2.6/debian/patches/0001-fix-printing-of-documents-with-images.patch
--- brlaser-6/debian/patches/0001-fix-printing-of-documents-with-images.patch   
2022-04-02 15:03:02.000000000 +0000
+++ 
brlaser-6.2.6/debian/patches/0001-fix-printing-of-documents-with-images.patch   
    1970-01-01 00:00:00.000000000 +0000
@@ -1,93 +0,0 @@
-From: Thorsten Alteholz <deb...@alteholz.de>
-Date: Sat, 2 Apr 2022 17:43:55 +0200
-Subject: fix printing of documents with images
-
----
- src/block.h        |  5 +----
- src/job.cc         | 18 +++++++++++++-----
- test/test_block.cc | 10 ----------
- 3 files changed, 14 insertions(+), 19 deletions(-)
-
-diff --git a/src/block.h b/src/block.h
-index e5dbd8d..1a6b6c6 100644
---- a/src/block.h
-+++ b/src/block.h
-@@ -25,7 +25,6 @@
- class block {
-  public:
-   block(): line_bytes_(0) {
--    lines_.reserve(max_lines_per_block_);
-   }
- 
-   bool empty() const {
-@@ -40,8 +39,7 @@ class block {
-   }
- 
-   bool line_fits(unsigned size) {
--    return lines_.size() != max_lines_per_block_
--      && line_bytes_ + size < max_block_size_;
-+    return line_bytes_ + size < max_block_size_;
-   }
- 
-   void flush(FILE *f) {
-@@ -59,7 +57,6 @@ class block {
- 
-  private:
-   static const unsigned max_block_size_ = 16350;
--  static const unsigned max_lines_per_block_ = 64;
- 
-   std::vector<std::vector<uint8_t>> lines_;
-   int line_bytes_;
-diff --git a/src/job.cc b/src/job.cc
-index 6f088ae..c328c67 100644
---- a/src/job.cc
-+++ b/src/job.cc
-@@ -103,14 +103,22 @@ void job::encode_page(const page_params &page_params,
- 
-   fputs("\033*b1030m", out_);
- 
-+  // XXX brother driver uses 128 lines per band
-+  const int lines_per_band = 64;
-+
-   for (int i = 1; i < lines && nextline(line); ++i) {
--    std::vector<uint8_t> encoded = encode_line(line, reference);
--    if (block.line_fits(encoded.size())) {
--      block.add_line(std::move(encoded));
--    } else {
-+    std::vector<uint8_t> encoded;
-+    if (i % lines_per_band == 0) {
-       block.flush(out_);
--      block.add_line(encode_line(line));
-+      encoded = encode_line(line);
-+    } else {
-+      encoded = encode_line(line, reference);
-+      if (!block.line_fits(encoded.size())) {
-+        block.flush(out_);
-+        encoded = encode_line(line);
-+      }
-     }
-+    block.add_line(std::move(encoded));
-     std::swap(line, reference);
-   }
- 
-diff --git a/test/test_block.cc b/test/test_block.cc
-index c476ee7..05642cf 100644
---- a/test/test_block.cc
-+++ b/test/test_block.cc
-@@ -37,16 +37,6 @@ const lest::test specification[] = {
-     EXPECT(!b.empty());
-   },
- 
--  "A block can contain 64 lines",
--  [] {
--    block b;
--    for (int i = 0; i < 64; ++i) {
--      EXPECT(b.line_fits(1));
--      b.add_line(vec(1));
--    }
--    EXPECT(!b.line_fits(1));
--  },
--
-   "A block has a size limit of about 16 kilobyte",
-   [] {
-     block b;
diff -Nru brlaser-6/debian/patches/series brlaser-6.2.6/debian/patches/series
--- brlaser-6/debian/patches/series     2022-04-02 15:03:02.000000000 +0000
+++ brlaser-6.2.6/debian/patches/series 2024-12-31 13:08:57.000000000 +0000
@@ -1 +0,0 @@
-0001-fix-printing-of-documents-with-images.patch
diff -Nru brlaser-6/debian/upstream/metadata 
brlaser-6.2.6/debian/upstream/metadata
--- brlaser-6/debian/upstream/metadata  2022-04-02 15:03:02.000000000 +0000
+++ brlaser-6.2.6/debian/upstream/metadata      2024-12-31 13:08:57.000000000 
+0000
@@ -1,4 +1,4 @@
-Bug-Database: https://github.com/pdewacht/brlaser/issues
-Bug-Submit: https://github.com/pdewacht/brlaser/issues/new
-Repository: https://github.com/pdewacht/brlaser.git
-Repository-Browse: https://github.com/pdewacht/brlaser
+Bug-Database: https://github.com/Owl-Maintain/brlaser/issues
+Bug-Submit: https://github.com/Owl-Maintain/brlaser/issues/new
+Repository: https://github.com/Owl-Maintain/brlaser.git
+Repository-Browse: https://github.com/Owl-Maintain/brlaser
diff -Nru brlaser-6/debian/watch brlaser-6.2.6/debian/watch
--- brlaser-6/debian/watch      2022-04-02 15:03:02.000000000 +0000
+++ brlaser-6.2.6/debian/watch  2024-12-31 13:08:57.000000000 +0000
@@ -1,2 +1,2 @@
 version=4
-opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/brlaser-$1\.tar\.gz/ 
https://github.com/pdewacht/brlaser/tags .*/v?(\d\S*)\.tar\.gz
+opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/brlaser-$1\.tar\.gz/ 
https://github.com/Owl-Maintain/brlaser/tags .*/v?(\d\S*)\.tar\.gz
diff -Nru brlaser-6/src/block.h brlaser-6.2.6/src/block.h
--- brlaser-6/src/block.h       2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/src/block.h   2023-08-02 02:07:30.000000000 +0000
@@ -25,7 +25,6 @@
 class block {
  public:
   block(): line_bytes_(0) {
-    lines_.reserve(max_lines_per_block_);
   }
 
   bool empty() const {
@@ -40,8 +39,7 @@
   }
 
   bool line_fits(unsigned size) {
-    return lines_.size() != max_lines_per_block_
-      && line_bytes_ + size < max_block_size_;
+    return line_bytes_ + size < max_block_size_;
   }
 
   void flush(FILE *f) {
@@ -59,7 +57,6 @@
 
  private:
   static const unsigned max_block_size_ = 16350;
-  static const unsigned max_lines_per_block_ = 64;
 
   std::vector<std::vector<uint8_t>> lines_;
   int line_bytes_;
diff -Nru brlaser-6/src/job.cc brlaser-6.2.6/src/job.cc
--- brlaser-6/src/job.cc        2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/src/job.cc    2023-08-02 02:07:30.000000000 +0000
@@ -26,17 +26,18 @@
 job::job(FILE *out, const std::string &job_name)
     : out_(out),
       job_name_(job_name),
-      page_params_() {
+      page_params_(),
+      pages_(0) {
   // Delete dubious characters from job name
   std::replace_if(job_name_.begin(), job_name_.end(), [](char c) {
       return c < 32 || c >= 127 || c == '"' || c == '\\';
     }, ' ');
-
-  begin_job();
 }
 
 job::~job() {
-  end_job();
+  if (pages_ != 0) {
+    end_job();
+  }
 }
 
 void job::begin_job() {
@@ -77,8 +78,12 @@
   fputs("\033E", out_);
   fprintf(out_, "\033&l%dX", std::max(1, page_params_.num_copies));
 
-  if (page_params_.duplex) {
+  if (page_params_.duplex && page_params_.tumble) {
     fputs("\033&l2S", out_);
+  } else if (page_params_.duplex) {
+    fputs("\033&l1S", out_);
+  } else {
+    fputs("\033&l0S", out_);
   }
 }
 
@@ -86,6 +91,11 @@
                       int lines,
                       int linesize,
                       nextline_fn nextline) {
+  if (pages_ == 0) {
+    begin_job();
+  }
+  ++pages_;
+
   if (!(page_params_ == page_params)) {
     page_params_ = page_params;
     write_page_header();
@@ -103,14 +113,22 @@
 
   fputs("\033*b1030m", out_);
 
+  // XXX brother driver uses 128 lines per band
+  const int lines_per_band = 64;
+
   for (int i = 1; i < lines && nextline(line); ++i) {
-    std::vector<uint8_t> encoded = encode_line(line, reference);
-    if (block.line_fits(encoded.size())) {
-      block.add_line(std::move(encoded));
-    } else {
+    std::vector<uint8_t> encoded;
+    if (i % lines_per_band == 0) {
       block.flush(out_);
-      block.add_line(encode_line(line));
+      encoded = encode_line(line);
+    } else {
+      encoded = encode_line(line, reference);
+      if (!block.line_fits(encoded.size())) {
+        block.flush(out_);
+        encoded = encode_line(line);
+      }
     }
+    block.add_line(std::move(encoded));
     std::swap(line, reference);
   }
 
diff -Nru brlaser-6/src/job.h brlaser-6.2.6/src/job.h
--- brlaser-6/src/job.h 2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/src/job.h     2023-08-02 02:07:30.000000000 +0000
@@ -27,6 +27,7 @@
   int num_copies;
   int resolution;
   bool duplex;
+  bool tumble;
   bool economode;
   std::string sourcetray;
   std::string mediatype;
@@ -36,6 +37,7 @@
     return num_copies == o.num_copies
       && resolution == o.resolution
       && duplex == o.duplex
+      && tumble == o.tumble
       && economode == o.economode
       && sourcetray == o.sourcetray
       && mediatype == o.mediatype
@@ -55,6 +57,10 @@
                    int linesize,
                    nextline_fn nextline);
 
+  int pages() const {
+    return pages_;
+  }
+
  private:
   void begin_job();
   void end_job();
@@ -63,6 +69,7 @@
   FILE *out_;
   std::string job_name_;
   page_params page_params_;
+  int pages_;
 };
 
 #endif  // JOB_H
diff -Nru brlaser-6/src/main.cc brlaser-6.2.6/src/main.cc
--- brlaser-6/src/main.cc       2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/src/main.cc   2023-08-02 02:07:30.000000000 +0000
@@ -111,6 +111,7 @@
   p.economode = header.cupsInteger[10];
   p.mediatype = header.MediaType;
   p.duplex = header.Duplex;
+  p.tumble = header.Tumble;
 
   if (header.MediaPosition < sources.size())
     p.sourcetray = sources[header.MediaPosition];
@@ -170,7 +171,6 @@
     return 1;
   }
 
-  int pages = 0;
   {
     job job(stdout, ascii_job_name(job_id, job_user, job_name));
     cups_page_header2_t header;
@@ -179,11 +179,11 @@
           || header.cupsBitsPerColor != 1
           || header.cupsNumColors != 1
           || header.cupsBytesPerLine > 10000) {
-        fprintf(stderr, "ERROR: " PACKAGE ": Page %d: Bogus raster data.\n", 
pages + 1);
+        fprintf(stderr, "ERROR: " PACKAGE ": Page %d: Bogus raster data.\n", 
job.pages() + 1);
         dump_page_header(header);
         return 1;
       }
-      if (pages == 0) {
+      if (job.pages() == 0) {
         fprintf(stderr, "DEBUG: " PACKAGE ": Page header of first page\n");
         dump_page_header(header);
       }
@@ -191,13 +191,12 @@
                       header.cupsHeight,
                       header.cupsBytesPerLine,
                       next_line);
-      fprintf(stderr, "PAGE: %d %d\n", ++pages, header.NumCopies);
+      fprintf(stderr, "PAGE: %d %d\n", job.pages(), header.NumCopies);
     }
-  }
 
-  if (pages == 0) {
-    fprintf(stderr, "ERROR: " PACKAGE ": No pages were found.\n");
-    return 1;
+    if (job.pages() == 0) {
+      fprintf(stderr, "ERROR: " PACKAGE ": No pages were found.\n");
+    }
   }
 
   fflush(stdout);
diff -Nru brlaser-6/test/tempfile.h brlaser-6.2.6/test/tempfile.h
--- brlaser-6/test/tempfile.h   2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/test/tempfile.h       2023-08-02 02:07:30.000000000 +0000
@@ -18,8 +18,10 @@
 #ifndef TEMPFILE_H
 #define TEMPFILE_H
 
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <cstdint>
 #include <vector>
 
 class tempfile {
diff -Nru brlaser-6/test/test_block.cc brlaser-6.2.6/test/test_block.cc
--- brlaser-6/test/test_block.cc        2019-09-22 19:27:36.000000000 +0000
+++ brlaser-6.2.6/test/test_block.cc    2023-08-02 02:07:30.000000000 +0000
@@ -37,16 +37,6 @@
     EXPECT(!b.empty());
   },
 
-  "A block can contain 64 lines",
-  [] {
-    block b;
-    for (int i = 0; i < 64; ++i) {
-      EXPECT(b.line_fits(1));
-      b.add_line(vec(1));
-    }
-    EXPECT(!b.line_fits(1));
-  },
-
   "A block has a size limit of about 16 kilobyte",
   [] {
     block b;
diff -Nru brlaser-6/test/test_job.cc brlaser-6.2.6/test/test_job.cc
--- brlaser-6/test/test_job.cc  1970-01-01 00:00:00.000000000 +0000
+++ brlaser-6.2.6/test/test_job.cc      2023-08-02 02:07:30.000000000 +0000
@@ -0,0 +1,35 @@
+// This file is part of the brlaser printer driver.
+//
+// Copyright 2020 Peter De Wachter
+//
+// brlaser is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 2 of the License, or
+// (at your option) any later version.
+//
+// brlaser is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with brlaser.  If not, see <http://www.gnu.org/licenses/>.
+
+#include "lest.hpp"
+#include "tempfile.h"
+#include "../src/job.h"
+
+const lest::test specification[] = {
+  "An empty job produces no output",
+  [] {
+    tempfile f;
+    {
+      job j(f.file(), "name");
+    }
+    EXPECT(f.data().empty());
+  },
+};
+
+int main() {
+  return lest::run(specification);
+}

Reply via email to