All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tobias Hoffmann <lprint-list@thax.hardliners.org>
To: Till Kamppeter <till.kamppeter@gmail.com>,
	Alex Korobkin <korobkin+op@gmail.com>
Cc: "printing-architecture@lists.linux-foundation.org"
	<printing-architecture@lists.linux-foundation.org>
Subject: Re: [Printing-architecture] Number of copies in pure PDF workflow
Date: Wed, 08 Oct 2014 16:40:26 +0200	[thread overview]
Message-ID: <54354CDA.50401@thax.hardliners.org> (raw)
In-Reply-To: <54350A8E.1010406@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3329 bytes --]

On 08/10/14 11:57, Till Kamppeter wrote:
> On 10/07/2014 11:45 PM, Tobias Hoffmann wrote:
>> I'm not sure what exactly is happening in your setup.
>> Maybe your PPD is missing something (- and I'm not an expert for PPD/PJL)?
>> Maybe you don't have a recent cups-filters (>= 1.0.34)?
>> Maybe you're hitting some edge-cases that are not handled correctly in
>> the current code?
>>
>> AFAIK no-one else has reported a problem with PJL in a pure pdf
>> workflow, and I can't find an obvious flaw in the code which deals with
>> PJL in pdftopdf. The code is also basically copied over from the old
>> pdftopdf implementation (cups-filters<=1.0.20); if your PPD does hw
>> copy with the old implementation, but not with>=1.0.34, I will probably
>> be able to fix that.
>>
> Tobias, do you know for what the call
>
> emitJCLOptions(stdout,ppd,param.deviceCopies);
>
> in the emitPreamble() function in pdftopdf_jcl.cc is good for? For me it
> looks like that it serves for inserting JCL options, but inserting JCL
> options is already done by
>
> ppdEmitJCL(ppd,stdout,param.jobId,param.user,param.title);

The code basically comes from the old pdftopdf implementation by Koji 
Otani. The same code is also present in imagetopdf.c .
There is also a section in cups-filter's README about that:

> if (Copies option is specified in the PPD file) {
>     mark Number of copies specified
> } else if (pdftopdfJCLCopies is specified in the PPD file) {
>     output JCL specified with JCLCopies
> }
>
> for (each marked options) {
>     if (pdftopdfJCL<marked option's name> is specified in the PPD file) {
>         output it's value as a JCL
>     } else if (pdftopdfJCLBegin attributes is specified in the PPD file) {
>         output "<option's name>=<marked choice>;" as a JCL
>     }
> }

AFAIUI Koji had to "invent" new pdftopdfJCL* keywords for the PJL + PDF 
case;
and for some reason ppdEmitJCL could not be used for them, so he added 
emitJCLOptions.


> I can even comment out
>
> emitJCLOptions(stdout,ppd,param.deviceCopies);
>
> and the output stays the same.

Probably because the PPD neither contain *Copies nor *pdftopdfJCLCopies?

> What I want to have is that if param.deviceCopies is not 1 (= multiple
> hardware copies) that
>
> @PJL SET COPIES=...
>
> is added.

Have you tried adding something along this lines:

*OpenUI *Copies/Number of Copies: PickOne
*OrderDependency: 100 AnySetup *Copies
*DefaultCopies: 1
*Copies 1/1: "@PJL SET COPIES=1"
*Copies 2/2: "@PJL SET COPIES=2"
*Copies 3/3: "@PJL SET COPIES=3"
*Copies 4/4: "@PJL SET COPIES=4"
...
*CloseUI: *Copies

similar to how Foomatic-based work?

A real PPD also has to take other settings into account here (e.g. 
collate, staple, ...), if the printer-hardware does not support all 
combinations /  has staple-limits / ...

> Currently all works fine for PPDs with "*cupsManualCopies: True" as
> pdftopdf generates software copies then. Without this entry pdftopdf
> sends only one copy of the PDF content and adds only a comment for
> subsequent filters. It does not add anything to generate the copies on a
> PDF printer.
The PPD author (printer manufacturer, ...) chooses to EITHER set 
"*cupsManualCopes: True" OR add *Copies / *pdftopdfJCLCopies / ... (i.e. 
whatever is required to generate correct JCL output for their printer 
model).

   Tobias




[-- Attachment #2: Type: text/html, Size: 4817 bytes --]

  reply	other threads:[~2014-10-08 14:40 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03 19:28 [Printing-architecture] Number of copies in pure PDF workflow Alex Korobkin
2014-10-03 19:49 ` Ira McDonald
2014-10-03 20:23   ` Alex Korobkin
2014-10-04 15:40 ` Michael Sweet
2014-10-04 17:36   ` Alex Korobkin
2014-10-04 19:47     ` Tobias Hoffmann
2014-10-05  4:58       ` Alex Korobkin
2014-10-04 19:48     ` Michael Sweet
2014-10-05  5:03       ` Alex Korobkin
2014-10-06 14:12         ` Michael Sweet
2014-10-06 15:07           ` Alex Korobkin
2014-10-06 15:32             ` Michael Sweet
2014-10-06 15:55               ` Alex Korobkin
2014-10-06 16:01                 ` Michael Sweet
2014-10-07 11:49               ` Till Kamppeter
2014-10-07 11:55                 ` Michael Sweet
2014-10-07 12:12                   ` Till Kamppeter
2014-10-06 12:54       ` Till Kamppeter
2014-10-06 14:06         ` Alex Korobkin
2014-10-07 14:06           ` Alex Korobkin
2014-10-07 20:03           ` Till Kamppeter
2014-10-07 21:18             ` Alex Korobkin
2014-10-07 21:45               ` Tobias Hoffmann
2014-10-08  2:53                 ` Alex Korobkin
2014-10-08  9:57                 ` Till Kamppeter
2014-10-08 14:40                   ` Tobias Hoffmann [this message]
2014-10-08 19:41                     ` Alex Korobkin
2014-10-08 20:53                       ` Tobias Hoffmann
2014-10-10 18:38                         ` Alex Korobkin
2014-10-10 20:06                           ` Tobias Hoffmann
2014-10-10 20:58                             ` Till Kamppeter
2014-10-14 19:17                               ` Alex Korobkin
2014-10-14 21:09                                 ` Tobias Hoffmann
2014-10-15 10:50                                   ` Tobias Hoffmann
2014-10-15 13:12                                     ` Till Kamppeter
2014-10-15 15:04                                       ` Till Kamppeter
2014-10-15 16:17                                       ` Till Kamppeter
2014-10-15 19:28                                         ` Tobias Hoffmann
2014-10-16 15:53                                           ` Till Kamppeter
2014-10-16 16:52                                           ` Alex Korobkin
2014-10-16 20:59                                             ` Tobias Hoffmann
2014-10-17 16:22                                               ` Alex Korobkin
2014-10-17 16:40                                                 ` Till Kamppeter
2014-10-20 16:23                                                   ` Alex Korobkin
2014-10-20 16:29                                                     ` Till Kamppeter
2014-10-20 17:28                                                       ` Alex Korobkin
2014-10-20 20:30                                                         ` Till Kamppeter
2014-10-20 21:18                                                           ` Alex Korobkin
2014-10-15 16:22                                       ` Tobias Hoffmann
2014-10-15 17:06                                         ` Alex Korobkin
2014-10-15 19:02                                           ` Tobias Hoffmann
2014-10-15 19:16                                             ` Tobias Hoffmann
2014-10-07 22:40             ` Michael Sweet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54354CDA.50401@thax.hardliners.org \
    --to=lprint-list@thax.hardliners.org \
    --cc=korobkin+op@gmail.com \
    --cc=printing-architecture@lists.linux-foundation.org \
    --cc=till.kamppeter@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.