Integration non kde applications with kdeprint]

Goffioul Michael goffioul at imec.be
Mon Nov 14 10:33:21 CET 2005


> On 5 November 2005 14:16, Roman Glebov wrote:
> >
> > I need a documentation on the kprinter api.
> 
> Here is the automatically generated API documentation:
> 
> http://developer.kde.org/documentation/library/3.5-api/kdelibs
> -apidocs/kdeprint/html/index.html
> 
> > I do not really have an overview how programs communicate 
> with kdeprint
> > when it is fully integrated.
> > Can you explain it to me ?

KDEPrint provides a painting device to the application where it can
draws its content using Qt painting primitives. When developing under
Qt, printing is then not more complicated than drawing on your top widget.
Of course, this is not the way to go from a 3rd-party point of view,
except if you want to rewrite your app...
In your case, what kdeprint can do for you is to be the bridge between
your app and the print spooler, taking care of the printer selection,
print options and so on, but it's up to you to provide kdeprint with
a fully-featured PS file. kdeprint is then only a user-friendly lpr
replacement.

Note that you can also use the KPrinter class to send your own files to
the print spooler, using the KPrinter::printFiles() function.

Michael.


More information about the kde-print mailing list