Git Product home page Git Product logo

Comments (31)

0xAl3xH avatar 0xAl3xH commented on July 16, 2024 4

Tried v6 and still couldn't print so played around with source a bit. Reducing lines per block to 32 static const unsigned max_lines_per_block_ = 32 in src/block.h allowed this to print. I tried this change only because reducing lines per block seemed to solve a similar issue before. Not exactly sure why... can @pdewacht shine some light?

from brlaser.

reinhard66-ubuntu avatar reinhard66-ubuntu commented on July 16, 2024 3

Thanks, yes i can confirm that this fix works.
Looks like there is a need for a V6.1 package since all distro's uses the bad one then

from brlaser.

woffs avatar woffs commented on July 16, 2024 3

Confirm that master now prints fine on a HL-L2310D (while v6 fails if page contains larger areas of halftone). Maybe it's time for v7?

from brlaser.

philmoreau avatar philmoreau commented on July 16, 2024 3

Can confirm the change worked on an HL-L2320D for a PDF that could only be printed at 300dpi before. It can now be printed at 600dpi. I would humbly suggest a new official release.

from brlaser.

mathematicalmichael avatar mathematicalmichael commented on July 16, 2024 2

also can confirm building from master works. didn't even have to reinstall the printer, simply restarting CUPS did it

from brlaser.

maozy avatar maozy commented on July 16, 2024 2

I can confirm the change fixed the issue on HL-L2320D connected to a Raspberry PI4 with Rasbian bullseye. It was failed to print certain PDFs (no clue how they are special), the printer light blinked but nothing came out. After changing the max_lines_per_block_ = 32, these PDFs can be printed properly.
This issue and the fix were initially raised in 2019, now it's 2022 already, it is still not fixed in mainline?

from brlaser.

reinhard66-ubuntu avatar reinhard66-ubuntu commented on July 16, 2024 1

I stumbled upon a page that I was not able to print today: cant_print.pdf using v5. Can someone see if they can print it on other printers or versions and what might be the issue? Thanks!

Does not work for me either on Ubuntu using brlaser V6 and a Brother DCP-L2500D

from brlaser.

reinhard66-ubuntu avatar reinhard66-ubuntu commented on July 16, 2024 1

can confirm too that it works.Doesn't need to restart CUPS, just did a new print job.

from brlaser.

tuxerman avatar tuxerman commented on July 16, 2024 1

I had a similar issue with my brand new L2300D which stopped printing an image-heavy page (job listed as successful, but nothing printed). This was on a raspberry pi connected to the printer via USB and running CUPS. Compiling the latest master branch and installing V6 drivers seems to have fixed this. Thanks!

from brlaser.

proteusvacuum avatar proteusvacuum commented on July 16, 2024 1

Can also confirm that building from master works to for an HL-2270DW. Thank you!

from brlaser.

DrewBrunning avatar DrewBrunning commented on July 16, 2024 1

Master still has this issue for me, but the branch from #68 does, in fact, resolve the issue.
For those looking to fix master, updating const int lines_per_band = 64; in job.cc to a value of 32 resolved the issue for me in the same way running the code from PR #68 did.

from brlaser.

0xAl3xH avatar 0xAl3xH commented on July 16, 2024

Bump on this. Anyone able to replicate this? Also, any tips on looking at useful logs to debug?

from brlaser.

abwillis avatar abwillis commented on July 16, 2024

Printing the pdf to a Brother MFC-7365DN on OS/2 with brlaser 6 worked fine.

from brlaser.

0xAl3xH avatar 0xAl3xH commented on July 16, 2024

Interesting, I should add I'm printing this from Raspbian on a Raspberry Pi.

from brlaser.

gtjeffw avatar gtjeffw commented on July 16, 2024

I also had trouble with the HL-L2320D, specifically on a Raspberry Pi Zero W with Raspian. I recompiled with the max_lines_per_block_ = 32 change of @al3x-huang and now have a lot more success printing. I haven't done exhaustive testing but so far so good.

Before I discovered this discussion, I had some luck reducing to 300 dpi, but now I'm back to 600 with the previously mentioned fix.

I do still have issues with AirPrint (via avahi-discover). It only works some of the time, but I'm guessing that is potentially an unrelated issue.

from brlaser.

randyoo avatar randyoo commented on July 16, 2024

@al3x-huang THANK YOU!!!

I'm also printing from a Pi on Raspbian, with an HL-L2300D printer. I had been using brlaser v3, as included in the repo under printer-driver-brlaser. I noticed that simple documents seemed to print fine, but anything with a large-ish image would completely fail to print, but yielded no errors whatsoever. Your test document failed to print for me, as well.

I tried updating to self-compiled v6, but it didn't help. Recompiling with the lowered max lines per block declaration, as you suggested, solved the problem! I've also managed to print other documents that previously refused to print, so it looks like this completely resolves my issue. Thank you, thank you, thank you!

@pdewacht Should we open a pull request? Are there negative consequences to reducing max_lines_per_block_ to 32 instead of 64, other than performance?

from brlaser.

RaeedAhmed avatar RaeedAhmed commented on July 16, 2024

@al3x-huang Thanks so much. This is all very new to me, but I got my HL L2320D to print as well with your fix. I'm using a Raspberry Pi 3A as my print server, sharing the printer on my network.

I was able to print text documents just fine when using brlaser v4 with the 2300D driver (2320D not listed) but couldn't print any pdf files no matter the complexity. What's strange is printing test pages worked both directly through the CUPS web UI as well as built in Windows' Printers settings (in the case of CUPS it has some logos/images on the test page) so I'm not really sure what was causing issues.

I came across this forum and decided to build from source to get the v6 drivers (which has the 2320D listed), and also changed max_lines to 32 as well. Finally got it working!

from brlaser.

rgilbert90 avatar rgilbert90 commented on July 16, 2024

@al3x-huang Thanks for your suggestion! Worked for my L2320D printer as well!

from brlaser.

snejok avatar snejok commented on July 16, 2024

A had a problem with printing jpeg files, but reducing max_lines_per_block_ = 32 helps me too.
Thank you @al3x-huang so much!

from brlaser.

0xAl3xH avatar 0xAl3xH commented on July 16, 2024

I stumbled upon a page that I was not able to print today: cant_print.pdf using v5. Can someone see if they can print it on other printers or versions and what might be the issue? Thanks!

Does not work for me either on Ubuntu using brlaser V6 and a Brother DCP-L2500D

Could you try it with the fix described here and see if it works? Seems like it solves the issue for many others.

from brlaser.

stingray-11 avatar stingray-11 commented on July 16, 2024

Also can confirm, was having issues with a HL-L2300D with version 4 in Debian Buster and this patch resolves them.

from brlaser.

mathematicalmichael avatar mathematicalmichael commented on July 16, 2024

can confirm that #68 resolved my pdf printing issues on ubuntu 18 (x86)

from brlaser.

pdewacht avatar pdewacht commented on July 16, 2024

Sorry, that was an accidental close.

I'm hesitant about your proposed change. It doesn't match what Brother's driver does, that driver will happily generate large blocks. It also doesn't seem to fix the issue for some people, e.g. in #40 somebody said he needed to reduce that constant to 16.

I made a different change that I think might be a better fix to the problem (not sure though, as I can't reproduce the problem with my own printer.) The Brother driver chooses its block size in such a way that a sequence of blocks always adds up to exactly 128 lines. brlaser didn't do that. But if you reduce max_lines_per_block_, you make it much more likely for that to happen "by accident". Which would explain why this change worked.

@al3x-huang, can you try the master branch and see if you can still reproduce the problem with that version?

from brlaser.

stingray-11 avatar stingray-11 commented on July 16, 2024

I reverted the block size and updated to master. Haven't done extensive testing but I printed a few pages of a PDF and it does seem to work. I also tried the "can't print.pdf" and it worked, though I don't know whether it would've worked or not before. HL-L2300D.

from brlaser.

mathematicalmichael avatar mathematicalmichael commented on July 16, 2024

@pdewacht looks like my timing was just a bit off, glad I kept getting notifications for this thread... lol
I still have #68 built and working on my printer, but from the sounds of it, rebuilding the driver from the current master is the "better" solution? I can attempt to print out what gave me trouble before if it'll help debug the issue (least I can do to thank you for this repo). I also have the HL-L2300D.

from brlaser.

selcukgider avatar selcukgider commented on July 16, 2024

@al3x-huang, can you try the master branch and see if you can still reproduce the problem with that version?

@pdewacht for DCP-1610W printer rebuilding the driver from the current master seems to have fixed the issue for me.

from brlaser.

0xAl3xH avatar 0xAl3xH commented on July 16, 2024

@pdewacht yes can confirm building master resolves the original issue.

from brlaser.

RussianNeuroMancer avatar RussianNeuroMancer commented on July 16, 2024

If anyone need this, I published aarch64 build of latest stable release with applied 9d7ddda in ppa:russianneuromancer/ppa

from brlaser.

chrismorgan-hb avatar chrismorgan-hb commented on July 16, 2024

For the next person searching... Confirmed that rebuilding from master fixed a similar issue (couldn't print PDFs with images) for my HL-L2340D printing via a USB-connected Raspberry Pi.

from brlaser.

tonivj5 avatar tonivj5 commented on July 16, 2024

For the next person searching... Confirmed that rebuilding from master fixed a similar issue (couldn't print PDFs with images) for my HL-L2340D printing via a USB-connected Raspberry Pi.

I can confirm too! Using master works like a charm 👍🏻 Using Brother DCP-L2500D via Raspberry Pi Zero W

from brlaser.

stlouisubntu avatar stlouisubntu commented on July 16, 2024

Had the problem on Ubuntu 20.04 where some pdf (embedded images) would not print on my Brother HL-L2300D. Did the git clone and edited the src/block.h file (with vim) but the
static const unsigned max_lines_per_block_ = 64; line was not present.
Nevertheless, went ahead and inserted
static const unsigned max_lines_per_block_ = 32;
(right beneath the line
static const unsigned max_block_size_ = 16350; )
then did
cmake .
make
sudo make install

then power off the printer and deleted the existing printers.
Restarted cups
sudo systemctl restart cups
Then powered the printer back on and it was autodetected.
The problematic pdfs not print fine.

Hereby gently and respectfully request that the fix for this be committed and pushed out.

Thank you for all your work on this. Much appreciate the issue notes without which I would not have been able to apply the fix.

from brlaser.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.