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

List:       kde-core-devel
Subject:    Re: New KDE printing system
From:       Richard Moore <rich () ipso-facto ! freeserve ! co ! uk>
Date:       2001-02-28 18:14:03
[Download RAW message or body]



Michael Goffioul wrote:
> 
> > A few questions:
> >
> > - Is it possible to implement filters so that you can implement
> >   KDE equivalents of psnup and enscript?
> 
> I want to say "everything is virtually possible as long as you
> implement it". What do you have in mind ? Where do you want those
> filters to be ? The current implementation is this: the KPrinter uses
> a QPrinter object internally to produce PS in a temporary file. Then it
> sends it to the printer using the correct method. You can then imagine
> to plug any filter you want to process the PS produced by Qt. In fact
> the KPrinter class has a member "printFile" publicly available, which is
> also used by the KPrinter object to send the PS generated. You can
> imagine to make the filters occur at the beginning of this function to
> filter the file. The filter object would then check if it can process the
> file (enscript is not designed to process PS), then process it, otherwise
> do nothing.

Ok, thanks for the explaination. I'd like the filter to plug in
between the KPrinter object seen by the app and the actual spooling
system. For example: A 2up filter would take the pages created by the
app, rotate them and put them side by side on a single page, then send
the result of this transformation to the spooling system.

I've done this before by writing some postscript which did the job
then using it as prefix to the generated ps file. It would be much
cleaner to handle things like this in the printing system interface
so they are available to all apps and can be configured through the
standard print dialog.

Other filters might perform page numbering, adding borders etc.
so it would be nice to be able to build a chain of them, and
perhaps make it available as a 'virtual' printer.

Rich.

> 
> > - Is there any support for handling margins etc. so that people
> >   using the API don't have to worry about them?
> 
> KPrinter uses internally QPrinter to produce PS. So you still have to
> take care where on the page you are drawing.
> 
> Michael.
> 
> --
> ------------------------------------------------------------------
> Michael Goffioul                IMEC-DESICS-MIRA
> e-mail: goffioul@imec.be        (Mixed-Signal and RF Applications)
> Tel:    +32/16/28-8510          Kapeldreef, 75
> Fax:    +32/16/28-1515          3001 HEVERLEE, BELGIUM
> ------------------------------------------------------------------

-- 
     Richard Moore		rich@ipso-facto.freeserve.co.uk
http://developer.kde.org/	rich@kde.org

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

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