Future of KPrinter

Matt Rogers mattr at kde.org
Sat Sep 8 21:06:13 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Sep 8, 2007, at 2:29 PM, Alex Merry wrote:

> Thomas Zander suggested we kill off KPrinter in favour of QPrinter
> (http://lists.kde.org/?l=kde-core-devel&m=118918127627566&w=2).
>
> Here's a list of the features provided by the KDE printing system that
> the Qt printing system doesn't provide:
>
> * Customisable print dialogs - would require implementing our own
> KPrintDialog
> * Straightforward printer options (try clicking "properties" for a
> printer in the print dialog of the Qt assistant program, and doing the
> same in kolourpaint), ie: integration with KDE print management  
> system -
> would require implementing our own KPrintDialog
> * Printing a list of pages (such as 1,4,6-8) or the current page -  
> would
> required extending QPrinter and implementing our own KPrintDialog, or
> we could just tell people to get this info from KPrintDialog (it's  
> only
> needed by the application, not by the printing system)
> * Custom margins - would require extending QPrinter and  
> implementing our
> own backends (which might use a Qt builtin backend)
> * Pre-print filtering - would require extending QPrinter and
> implementing our own backends (which might use a Qt builtin backend)
> * "Special" printers (like Send Fax via KFax) independent of eg:  
> CUPS -
> would require extending QPrinter and implementing our own backends
> (which might use a Qt builtin backend when not printing to the special
> printers)
> * Print preview - more complicated.  We could probably provide a
> KPrintPreview class that uses a QPrinter to print to a file and then
> display that:
>
> QPrinter printer;
> KPrintPreview preview(printer); // configures the printer as needed
> // paint to the QPrinter as normal
> preview.show();
>
> Note that the printer kcm could be kept (without the option
> for "special" printers except via eg: CUPS) even if the whole of the
> kde printing API was scrapped.
>
> Are custom margins really needed?
>

What do you mean by custom margins? I think they would be needed for  
printing things like photos where the margins are very tiny or  
nonexistant.

>
> So, the choices are:
>
> * scrap KPrint* and just use Qt's system, (but keeping the printers  
> kcm)
> * scrap KPrinter and use QPrinter, but provide KPrintDialog as an
> extensible printing dialog integrated with the KDE print management
> system (and it can also delegate to QPrintDialog on Windows), and  
> maybe
> KPrintPreview as above - this is what Thomas suggested
> * provide KPrinter, a subclass of QPrinter, and potentially implement
> our own backend(s), as well as KPrintDialog
>
>
> Personally, I'm being more and more convinced by Thomas' suggestion
> (together with KPrintPreview).  If we get programs to get a page list
> from KPrintDialog rather than QPrinter, we should be able to implement
> everything except for pre-print filtering and special printers.  The
> latter we could possibly even do using QPrinter::setPrintProgram() [on
> X11 only], and the former seems quite specialist.
>
>
> I'd like a decision to be made on this ASAP, please, so I can start
> working on something.
>
> Alex
>
> PS: Thomas said that he will talk to the printing trolls about the
> missing features, but we wouldn't get them until 4.4 and we may not  
> get
> any of them, of course
>

The print preview API sounds nice at least. :)
- --
Matt


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (Darwin)

iD8DBQFG4wC2A6Vv5rghv0cRAqHQAKCYn8xbK/FyC2D3OHTjstXngmIS8QCfWPhF
yQCRq3JyeQOZkbcipUlS5T8=
=kv1M
-----END PGP SIGNATURE-----




More information about the kde-core-devel mailing list