Print different jobs into 1 pdf?

Kurt Pfeifle kpfeifle at danka.de
Mon Jun 9 15:03:26 CEST 2003


Maf. King wrote:

> On Monday 09 Jun 2003 10:45, Klaus Ridder wrote:
> 
>>is there any way to print multiple jobs from different applications
>>directkx into a single pdf file?

It is possible, but I don't know any ready-made Free software that
does it now.

In CUPS you could write a "pdfmerge" backend, as a shell script, which saves
the end-result in a certain directory. You'd install a virtual "PDFmerge"
printer using a generic PostScript-Printer PPD:

   lpadmin -p PDFmerge -v pdfmerge:/home/mergedPDFs/ -E -P /tmp/generic.PPD

You'd use the "send-multiple-files-within-one-job" CUPS feature:

   lp -d PDFmerge /path/to/1st.JPEG /path/to/ascii.txt /path/to/postscript.ps

Your backend would receive all the files under one job-title and job-ID,
converted to PostScript (since you used a PostScript-PPD for the wirtual
printer).

Your backend just needs to make sure that the PostScript merge of the arriving
files takes place (that's the non-trivial part) and that this merged PS is
then converted to PDF (the simple part).

Actually I have been writing a similar thing for a customer 4 weeks ago.

Unfortunately I will not have the time for the next 5 months to do this
as an unpaid job in my evening/weekend spare time. (If you need it desparately,
you may want to let it be developed for you and pay for it. You can then even
release it under the GPL...)

>>Regards,
>>Klaus Ridder
>>

Maf King then wrote:

> 
> Hi Klaus,
> 
> The only way I know to do this is to print each job to a postscript file, 
> and then combine them into a single PDF (using the ps2pdf command)
> 
> try :
> 
> "cat file1.ps file2.ps | ps2pdf - combined.pdf"

The "cat file1.ps file2.ps..." part is intended to "merge" the different
PostScript files into one. This won't work very well....

I can guarantee you, that this will only work as an *exception*, and only
if the PS input files do originate from the same application (driver), and
hardly if the input PostScript comes from various sources.....

> Hope that helps.
> 
> Maf.
> 
> 

Cheers,
Kurt



More information about the kde-print mailing list