From kde-devel Sat Aug 30 19:47:47 2003 From: =?iso-8859-1?Q?Dirk_Sch=F6nberger?= Date: Sat, 30 Aug 2003 19:47:47 +0000 To: kde-devel Subject: Re: Customerize printing X-MARC-Message: https://marc.info/?l=kde-devel&m=106227354432712 Hi, Nestal wrote, > Dear all, > I would like to add a KPrinter which will produce a PDF file when printing. > The current PDF printer in KDE is based on ghostscript, which is not very > specilized in producing PDF files (it will convert all fonts to Type3 fonts > which looks ugly in acrobat reader). I have written a small library called > libpdf++ (libpdfxx.sourceforge.net) and I want to use it to write a > specialized PDF printer for KDE. > I suppose the KDE apps uses the KPrinter class for printing, so my question is > where to insert the PDF-producing code? The basic rendering in Qt / KDE exists in the form of a QPainter / QPaintDevice framework. The KPrinter is a special QPaintDevice, like QWidget, QPrinter a.s.o. It is used to proxy to multiple printing queues, like LPng, CUPS a.s.o. Internally it uses an hard-coded Postscript generating paint device. So in order to integrate your PDF code generator, I suppose you have the following options: - implement a pure PaintDevice (inherit from QPaintDevice and wire the operator implementations) Doing so would require application developers to explicitly call their renderings with your paint device. I suppose this could be done via a standard action in an application GUI? - make the generator in KPrinter changeable and provide your PDF generator as some kind of special printer queue. This would involve changing KPrinter source code, I suppose. Hope this helps, Regards Dirk >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<