Integration non kde applications with kdeprint]

Goffioul Michael goffioul at imec.be
Thu Nov 17 09:21:00 CET 2005


> > What i want to do is :
> > 1) Program generates postscript file and passes it to kde print, kde
> > print reformats it , for example places it correctly on page.
> > 2) Program sends Bitmap, kprinter should again place it 
> correctly on page.
> >
> > i found out quite quickly how to handle picture with kprinter .
> > But what to do with postscript ? It can not be painted with 
> qprinter ,
> > right ?
> 
> > Should it be converted to bitmap first ?
> 
> Hmmm. I'm pretty sure you don't want to do that. You'll lose 
> resolution in the 
> process, probably.
> 
> Right now, if I understand correctly, kdeprint takes PS files 
> as they are and 
> just sends them to CUPS (and hence the printer), unless you 
> configure filters 
> like "poster", "psnup" and such. So, I think you might want 
> to investigate 
> what can you do with such filters. You can configure as many 
> filters as you 
> want (just look at how one of the existing filters is configured).

kdeprint does not process PS data itself (it doesn't process any print data
at all), but relies on "external" tools to do it. On one hand, it uses QPrinter
to convert the drawing primitives to PS data, on the other hand, it uses
filters to post-process to print data. If your program generates PS, it *should*
already be in a ready-state for sending to CUPS. The only things that kdeprint
can provides you in that case is some post-processing facilities (as Cristian
said) using common utilities like psnup, psresize...

If you really want to integrate better with kdeprint in case 1), you'd have
to use kprinter to produces the PS data and not to process it.

Michael.


More information about the kde-print mailing list