[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Customerize printing
From:       Dirk_Schönberger <dirk.schoenberger () sz-online ! de>
Date:       2003-08-30 19:47:47
[Download RAW message or body]

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 <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic