Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brother HL-1210W; 1200HQ mode #40

Open
onnokort opened this issue Mar 22, 2019 · 7 comments
Open

Brother HL-1210W; 1200HQ mode #40

onnokort opened this issue Mar 22, 2019 · 7 comments

Comments

@onnokort
Copy link

Hi,

I own a brother HL-1210W printer. The printer prints the test page in cups correctly when installed. However, it silently fails for me for more complex documents. The printer LED will blink and then stop with the printer seemingly returning a succesful status, as all such jobs are presented as successful in the CUPS system.

However, I noticed that I can tweak your driver to get it to print complex documents. The following change seems to do the trick:

diff --git a/src/block.h b/src/block.h
index 13daea1..e5dbd8d 100644
--- a/src/block.h
+++ b/src/block.h
@@ -59,7 +59,7 @@ class block {
 
  private:
   static const unsigned max_block_size_ = 16350;
-  static const unsigned max_lines_per_block_ = 128;
+  static const unsigned max_lines_per_block_ = 64;
 
   std::vector<std::vector<uint8_t>> lines_;
   int line_bytes_;

The 64 seems to be a sharp limit; with any higher value it doesn't work. Tested with generating a 4958x7008 1-bit image in gimp, filling it with 50% random black pixels, saving as .ps (default options) and then using gstoraster followed by rastertobrlaser. Also tested with a simple printed web page from firefox that resulted in a raster file of the same dimensions from gstoraster.

Hope this helps and thanks for writing the driver.

@onnokort onnokort changed the title HL-1210W Brother HL-1210W Mar 22, 2019
pdewacht added a commit that referenced this issue Mar 25, 2019
This fixes HL-1210W, maybe other HL printers as well?
@pdewacht
Copy link
Owner

Thanks! That was a mysterious issue that was reported with many Brother HL-series printers. I'll check with a couple of other reporters and make a new release soon.

@onnokort
Copy link
Author

You're welcome. To add some further info: 600dpi seems to work fine on my printer now, but out of curiousity I tried printing once at 1200dpi and it failed for a normal (so moderately complex) document. I suspect that the value might need to be even lower (half?) for that. As I am not really interested in that resolution / mode I didn't do any further investigation but can do that if you want - just drop me a note.

Are the values that are currently in the driver basically reverse-engineering guesses or is there some kind of further reasoning behind them?

@pdewacht
Copy link
Owner

It's mostly guesswork, based on my old DCP-7030. It seems to work well on DCP-series printers, but the HL-series seems to behave just a little different.

@warheat1990
Copy link

@pdewacht: hello, any ETA on when is this changes going to be pushed in printer-driver-brlaser package? Thanks

@pdewacht pdewacht changed the title Brother HL-1210W Brother HL-1210W; 1200HQ mode May 18, 2019
@onnokort
Copy link
Author

onnokort commented Jun 7, 2019

Sorry to bother everyone again, but I think it is fair to notice here that I again had trouble printing a document using my HL-1210W with default settings (600dpi). This time I tried to print a RGB JPEG scan of 300dpi (A4) that I converted to PDF using imagemagick's convert tool. The JPEG had a resolution of 2464x3500 pixels.

Lowering the value of max_lines_per_block_ from 64 further down to 32 did the trick for me. I haven't tested whether this might impact other prints, so YMMV. I do not have enough insight into the workings of the transmission scheme to the printer to know whether setting even just a value of 1 here would cause the printer to fail processing on other occasions; but if that is not the case, I suggest changing it to a really safe value like that as I think it is better to have a slowly printing printer than one that silently drops pages depending on their complexity.

@mickeyreg
Copy link

DCP-1512E here :) Similar problem noticed - 1200HQ mode did not print anything. I've set max_lines_per_block_ = 16, then recompiled and reinstalled driver and 1200HQ works fine :) Thanks for a hint :)

pdewacht added a commit that referenced this issue Apr 20, 2020
This is more similar to what the Brother driver does. This might
fix #52, #40, etc.
@iloveitaly
Copy link

I had this issue on my printer HL-L2340D. This commit fixed the issue for me.

@reox reox mentioned this issue Mar 26, 2022
4 tasks
QORTEC pushed a commit to Owl-Maintain/brlaser that referenced this issue Mar 14, 2023
This is more similar to what the Brother driver does. This might
fix pdewacht#52, pdewacht#40, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants