27

This has baffled me for a few weeks now. I have a Kyocera network printer set up in CUPS, and whenever I try to print to it I seem to end up with n² as many copies as I request. That is,

  • I try to print 2 copies of a document and I get 4
  • I try to print 5 copies of a document and I get 25
  • I try to print 60 copies of a document unattended, it runs out of paper, and I wander around the building depositing the extra copies in many recycling bins so as not to implicate myself too directly as the culprit

I cannot begin to imagine how to diagnose this, but besides being mildly amusing it does mean that to get my desired 60 copies of a document I have to go to some esoteric lengths (e.g. print 7 copies, print 3 copies, print 1 copy two times) which was amusing at first but has quickly gotten old.

So I am posting here in the hopes that someone can reassure me that I am not crazy, and hope that maybe someone might have experienced this before and know of a way to fix it?

I am printing a PDF from Document Viewer 3.18.2

  • 5
    +1 It sounds like your software sends N times a request to the printer for N copies of your doc! – L. Levrel Feb 25 '16 at 12:34
  • 8
    "...to get my desired 60 copies of a document I have to go to some esoteric lengths (e.g. print 7 copies, print 3 copies, print 1 copy two times) which was amusing at first but has quickly gotten old." Clearly the solution is to fob the mathematics off onto a computer program. Luckily, Wolfram Alpha knows how to calculate the answer for you: give it "60 sum of squares" and you get back three solutions, one of which is the 7² + 3² + 1² + 1² solution you came up with on your own. Problem solved. :) – Warren Young Apr 16 '16 at 22:42
  • 6
    Incidentally, by Lagrange's four-square theorem, every positive integer is the sum of four squares. – Alexey Jun 29 '16 at 14:43
  • 2
    I don't have the answer, but given that you consistently get n² copies suggests that you have a pipeline in which more than one member is performing the 'xn' operation and (at least the first of those) is not removing that option as it processes it. Perhaps that helps you diagnose the problem? – Toby Speight Jun 29 '16 at 16:21
  • 4
    @richard : 9 = 3^2 + 0^2 + 0^2 + 0^2. – Alexey Jul 10 '16 at 7:54
4

FWIW, I had the very same issue with a Brother QL-1050 label printer, under Debian Sid. It was not an application bug as suggested in comments, but a CUPS/driver issue. You can confirm this by running lp or lpr and see if it is affected as well :

lp -d YOURPRINTER -n 2 /some/file.pdf
lpr -P YOURPRINTER -# 2 /some/file.pdf

I managed to solve the problem by editing /usr/lib/cups/filter/brother_lpdwrapper_ql1050, and modifying the line

CUPSOPTION=`echo "$5 Copies=$4" | sed -e …

into

CUPSOPTION=`echo "$5" | sed -e …

(Copies=1 also works).

I guess the number of copies was feeded twice somehow.

There must be a similar file for your printer, and though I guess the name and definition of CUPSOPTION may vary, those options are probably defined there.

  • 1
    Hi, I stumbled upon this exact problem, however, I can't find any CUPSOPTION variable in the filter file. The setup is somewhat more complicated because the printer is shared over network and configured as a "Raw" printer on the host while being configured properly on the client. So I assume that the filter file in question is the one on the client. Here is its content: pastebin.com/1gf1jdC9 Running the lp command in your answer on the client prints 4 copies, running it on the host prints nothing (since the printer is configured as "Raw" there). Any ideas what could be wrong here? Thx! – Photon Dec 25 '18 at 21:04
  • 1
    @Photon I had a look at your pastebin, but I'm afraid I can't be of much help. Good luck. – Skippy le Grand Gourou Dec 25 '18 at 21:33
  • Thanks for the quick reply! I'll post in case I figure it out, I'm somewhat pessimistic yet though. :) – Photon Dec 25 '18 at 21:38
  • I'm having the same problem. How do you work out which filter file to modify? Also, FWIW, grep CUPSOPTION -r /usr/lib/cups/filter is empty on my system. – Sparhawk Jul 30 at 2:16
  • @Sparhawk I believe filters are named after the printer model. Aside from that I can only reiter my answer to Photon : if the answer doesn't fix the problem by itself, I'm afraid I can't be of much help, and wish you good luck. – Skippy le Grand Gourou Jul 30 at 7:54
-1

As you are using "Document Viewer 3.18.2" (which seems to be an Android application: https://play.google.com/store/apps/details?id=org.sufficientlysecure.viewer), may I suggest you try printing from a Windows and then a Linux PC connected to the printer.

With Windows it will check whether the config at printer end is OK. With Linux you can check the CUPS settings. On the Linux side, try printing with both a viewer like Evince and the command line. For command line printing the page at: https://www.cups.org/doc/options.html gives a lot of information.

  • 1
    Document Viewer 3.18.2 is a Linux application. – Mala Sep 27 '17 at 14:57
  • "Document viewer" is as Evince introduce itself to the user. – gerlos Nov 12 at 10:09

protected by Community Aug 23 '16 at 6:41

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.