pdewacht / brlaser

Brother laser printer driver
GNU General Public License v2.0
592 stars 112 forks source link

[DCP-L2510D] Multiple copies are printed as corrupted duplex #100

Open tbtommyb opened 3 years ago

tbtommyb commented 3 years ago

Hello, first of all many, many thanks for creating this driver. I'm really impressed by the effort that's gone into this and how well it works overall.

I have a DCP-L2510D which I have working via CUPS and a Pi Zero. I am using the DCP-L2520D driver as that seems closest. Just to note, I am using the current master build to fix the issues mentioned in #52 .

Before switching to the current master, this PDF didn't print. It now does but when I try to print multiple copies it prints them as duplex (even though I haven't selected that option) and the output on the rear side of the page is corrupted.

Just to be clear, if I try to print four copies of a single-page PDF (without selecting duplex mode), it will print only two pages in duplex mode and the second side of each page will be (identically) corrupted.

Documents longer than a page do print correctly (including in duplex mode), so it seems to be some confusion between multiple copies of a single page and duplex printing.

Many thanks again!

evanmiller commented 3 years ago

@tbtommyb I've been rummaging around the duplexing code and have a possible explanation for you. It looks like duplexing is enabled here:

https://github.com/pdewacht/brlaser/blob/9d7ddda8383bfc4d205b5e1b49de2b8bcd9137f1/src/job.cc#L81-L83

But the setting might not be properly cleared when duplexing is disabled (after being enabled in a previous job). You might try resetting the printer, or you might try out the code I've submitted in #124 – which is more explicit in turning duplex on and off.

However, that theory doesn't explain why the back page would be corrupted – so I'm not 100% confident in it.

QORTEC commented 1 year ago

Hello @tbtommyb, there is a pull request #169 that describes an issue identical to yours; the HL-L2350DW printing in duplex when disabled, and every other page being garbled.

Currently I'm maintenance a fork of the brlaser driver and would like to know if the pull request fixed the issue for other printers like yours. I've also pulled in the fix into my fork/pull request #92.

If possible could test pull request #169 or #92, and see if your issue was resolved?