1

I am printing from an rpi3 using nginx+php7.1+cups, connected to a canon printer, which downloads pdf files through https requests. From the rpi3, i issue the following command when something needs to be printed in PHP7.1;

exec(‘lpr -P ‘ . $printer . ‘ -r ‘ . $filename);

The first print (on startup) is fine but any other following requests are printed with garbage letters on the first page in the pdf. The other pages in the same pdf are fine.

When i reboot the rpi3, the first print request is again printed fine, but all following requests have garbage letters on the first page of the pdf.

I have tried restarting cups but that was not the solution. Is there a solution for this?

Update 04/03/2018:

It seems to be a usb problem. When I disconnect/reconnect the usb cable of the printer, the first print is fine, following prints are not. I am now connecting through cups socket (ethernet cable) and each print comes out fine without gibberish characters.

Problem is temporarily solved by connecting with ethernet cable instead of usb cable (tried two different usb cables, different make and short and long).

Any feedback on this matter would be of great help. It seems RPI or CUPS USB is not flushing all data through the usb connection correctly.

Printer model: Canon printer i-sensys lbp 7730.

Cups driver: cups+gutenprint v5.2.10

  • Anything in /var/log/cups/error_log ? Sounds like device driver issue. I would check http://localhost:631/admin too. – Fabian Mar 1 '18 at 22:29
  • @Fabian No errors in cups and tried all settings in cups/admin but i dont think that is the problem. – Nitin Mar 3 '18 at 20:38
  • @Fabian it seems to be a usb problem. Problem is solved by using ethernet cable instead of usb cable. – Nitin Mar 4 '18 at 13:11
  • 1
    Glad to hear it's solved! Maybe you want to add the full name of the printer in case other people search for this in the future. – Fabian Mar 4 '18 at 18:46
  • 1
    and add the tag "printing" please :) – Fabian Mar 4 '18 at 18:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.