Print different jobs into 1 pdf?

Michael Goffioul goffioul at imec.be
Tue Jun 17 14:46:47 CEST 2003


> 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, 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> ...

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

Michael.

-- 
------------------------------------------------------------------
Michael Goffioul		IMEC-DESICS-MIRA
e-mail: goffioul at imec.be	(Mixed-Signal and RF Applications)
Tel:    +32/16/28-8510		Kapeldreef, 75
Fax:    +32/16/28-1515		3001 HEVERLEE, BELGIUM
------------------------------------------------------------------


More information about the kde-print mailing list