Print different jobs into 1 pdf?

Kurt Pfeifle kpfeifle at danka.de
Tue Jun 17 16:27:36 CEST 2003


Michael Goffioul wrote:
>>10. You've now 3 different input files. Click "Print". For
>>     each dialog box asking for a decision to "Convert" or
>>     "Keep" the file format of input files before they get
>>     transfered to CUPS, choose "Convert" (This lets KDEPrint
>>     do a conversion to PostScript first. Theoretically, you
>>     could also choose "Keep", and let CUPS do the conversion.
>>     But some image formats do a direct "imagetoraster" conversion
>>     instead of an intermediate "imagetops" which is required
>>     for the final PDF generation).
> 
> 
> To be correct, CUPS is not involved in this case,

Yes, of course, I didn't think about it. The KDEPrint "Special
Printers" are working with each print subsystem as they are
independent from them, and don't use them...

> only KDEPrint.
> So KDEPrint has to do the conversion to PS, or the PDF generation
> will fail. Indeed, the PDF generation (within KDEPrint) relies
> on the "ps2pdf" script. When you print several files at once,
> KDEPrint ends up with the command:
> 
> ps2pdf <file1> <file2> <file3> ...
> 
> "ps2pdf" only accepts PS file, hence the required conversion.
> Moreover, when "ps2pdf" is called with several files, they are
> all concatenated into a single PDF file.
> 
> Note that "ps2pdf" is only wrapper around "gs" with the pdfwrite
> device pre-selected. So the concatenation feature is actually
> a feature of ghostscript. Now, using the pswrite device instead,
> you should be able to do exactly the same and generate a concatenated
> PS file. That means defining a pseudo printer around the command:
> 
> gs -dBATCH -sDEVICE=pswrite <file1> <file2> <file3> ...
> 

Here is the problem.

pswrite doesn't work reliably for all kinds of input files. Or at
least, it didn't work when I last checked.

The reason is, that you should normally have a PostScript "wrapping
routine" of "gsave...<file1> grestore... gsave <file2> grestore..."
around each of the input files.

> (Look at the implementation of ps2pdf script to know the exact
> command. Note that I didn't test it).
> 
> Michael.
> 

Cheers,
Kurt



More information about the kde-print mailing list