5

I just upgraded to 19.04. I have a Brother laser printer that I've used for quite a while with 14.04 with no problems. I reinstalled the drivers, and have been using the printer in 19.04, also without problems, to print .odt, .docx, and .pdf files.

This morning I tried to print a specific pdf. Nothing seems amiss when I click print, but the file did not print. I tried other pdfs, and they work fine. I tried another pdf reader (Okular instead of Evince) and that same file will not print from Okular either. Same if I open it in Firefox.

It's not the end of the world if I can't print this one pdf on this machine, but I am very curious about what could be causing this. Any tips on how to troubleshoot, or what might cause a single pdf to not print?

5 Answers5

3

In addition to the "Force rasterization" in Okular, you might be able to get around these unprintable PDFs by converting them to a 600 DPI .djvu file:

pdf2djvu -d 600 file.pdf > printable.djvu

or to a 600 DPI PDF 1.3 file:

ps2pdf13 -r600x600 file.pdf printable.pdf 

More details can be found at https://feeding.cloud.geek.nz/posts/printing-hard-to-print-pdfs-on-linux/.

1

I came across this question because I have the same issue with a specific pdf (OpenSUSE Tumbleweed, kde, Epson printer, Okular). While I still don't know why this happens, a 'Force Rasterization'in the kde print dialog, pdf options, works around the issue for me.

Karsten
  • 11
1

Just lost a good forty minutes of my life on this which I will never get back.

Very, very strange. Some pdfs, the printer totally springs to life, prints all pages, double sided if you want. Other pdfs it just won't not respond, as if it is totally aloof, too good to print that pdf.

I tried pdf2djvu and ps2pdf13 solutions above which did not work for the troublesome pdf.

What did work was this -

convert -density 288 problematic.pdf unproblematic.pdf

Imagemagick did the trick. Found that here -

https://forums.bunsenlabs.org/viewtopic.php?id=6599&p=2

There was another suggestion with gs which produced a file which would not print.

It is probably not the printer drivers. In my case I am using Debian 11 Bullseye and the printer is a Brother HL-L2340DW. The drivers were installed with

sudo apt install printer-driver-brlaser

..but it really seems to be the peculiarity of some pdfs more than the drivers as I also experimented with drivers and patches from the brother website which did not solve it. Very peculiar I wonder what the root cause it.

Edit :

The printer just misbehaved again a month later despite those 2 measures. I ran pdfinfo on the 4 pdfs in the directory only 1 of which had behaved. Spotted the issue, although not really explainable - the one which worked had page size US legal instead of A4. So I just changed the paper size for the ones which were not working in the dropdown menu. What is bothersome is that there is no error message neither on the PC nor on the LCD of the printer, just quiet failure, but this is another hint to fix it.

0

I since realised there is a page here for that printer : Brother HL-L2340DW printer

..however I might have solved the problem, hope this helps someone.

Clone this :

https://github.com/pdewacht/brlaser

git clone https://github.com/pdewacht/brlaser.git

Install one of the CUPS development packages as they say, libcups2-dev, libcupsimage2-dev or similar.

Then build it from source

cd brlaser/
cmake .
make
sudo make install

This seems to have made the HL-L2340DW print a troubled pdf that nothing else would fix. Time will tell if this has totally fixed it. That repo looks like it is more frequently maintained than the downloads from the Brother website. The problem pdf printed after this without needing any of the treatments.

0

Did you ever post the troublesome PDF?

Since there is a bounty and no accepted answer, and since you're asking for tips, I would try one of these three options:

  1. Load the PDF into Inkscape and try printing from there.
  2. Load the PDF into LibreOffice Impress and try printing from there.
  3. Load the PDF into GIMP, and see if that works...

Regarding these options, I've had better success with Inkscape relative to LibreOffice, which usually makes a mess of the files. GIMP is actually really good at importing PDFs, but multiple pages are a hassle; Inkscape may present similar problems.

These options should essentially be equivalent to running, e.g, pdftocairo -png foo.pdf bar and printing the individual images from display/okular/etc.

But it's really hard to troubleshoot the specific problem without a file to examine.

rand'Chris
  • 211
  • 3
  • 6