Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Multiple copies to remote linux server solved. (ppc/tiger/10.4.5)



Hello!

I have had a problem for a while when printing through OSX's cupsd via IPP
to a linux cups-server (that is serving a whole campus).
When i wanted to print 1 copy all was fine, but when printing 2 i got 4 and
3 i got 9 copies.. I found out that what is causing the problem is that the ps-file
that gets sent to the remote cups-server has an embedded copies-number and
gets sent as many times as the amount of copies that you wanted.. therefor
i got a factor two of what i wanted :/..
As most of cups on the mac is opensource, i got hold of the source for the
ipp-backend to cups and modified it a bit. Posting the diff to anyone that is interested
and also a link to somewhere that you can (hopefully still) get the binary from (already patched and built that is)..


ftp://ftp.su.se/pub/macosx/ipp (and it should go into the folder /usr/libexec/cups/backend/)

This is how i configure my printers locally (but send all jobs through the remote cups-server,
raw means that the output should go through without processing extra ppd/filter processing)...


ftp://ftp.su.se/pub/macosx/printdialog.png

And this is how the patch looks like..

#########################################################################
--- ipp_original.c       2006-03-21 17:05:10.000000000 +0100
+++ ipp_new.c 2006-03-21 16:59:16.000000000 +0100
@@ -637,7 +637,7 @@
  if (copies_sup || argc < 7)
    copies = 1;
  else
-    copies = atoi(argv[4]);
+    copies = 1;

 /*
  * Figure out the character set to use...
@@ -779,7 +779,7 @@

      cupsEncodeOptions(request, num_options, options);
      ippAddInteger(request, IPP_TAG_JOB, IPP_TAG_INTEGER, "copies",
-                    atoi(argv[4]));
+                    1);
    }

    cupsFreeOptions(num_options, options);
@@ -834,7 +834,7 @@

    if (ipp_status <= IPP_OK_CONFLICT && argc > 6)
    {
-      fprintf(stderr, "PAGE: 1 %d\n", copies_sup ? atoi(argv[4]) : 1);
+      fprintf(stderr, "PAGE: 1 %d\n", copies_sup ? 1 : 1);
      copies --;
    }
    else if (ipp_status != IPP_SERVICE_UNAVAILABLE &&
#########################################################################



Hope this is to some help for somebody!

Best regards,
Martin Viklund (Sysadmin at Stockholm University)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Printing mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/printing/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.