KDE4 printing: results of IRC meeting
Thomas Zander
Thomas.Zander at trolltech.com
Thu Sep 13 15:40:28 BST 2007
On Thursday 13 September 2007 01:30:00 Alex Merry wrote:
> The two must-have features for 4.0 that Qt doesn't provide (yet) are
> print preview and custom dialog options.
Yesterday I realized that the actual problem was not really clearly defined. I
bet that the majority of kde-core-devel readers just get a general "it don't
work" feeling; so let me go over that.
INTRODUCTION
KDEPrint is build around a basic assumption that QPrinter generates
postscript. You can see this by the fact that ghostscript is used heavily.
For example to convert to pdf, but also to do 'filters'.
With the introduction of Qt4 this situation changed considerably; QPrinter is
now capable of generating not only postscript, but also PDF natively. And
since we want printing to work on Windows as well that adds the 'feature'
that QPrinter directly talks to the printer driver and the output of that
tends to be some sort of binary printer specific format.
PROBLEM
Due to the change of input most of the kdeprint will no longer be sufficient
for all cases where the application doesn't generate postscript. Which is
KOffice and all apps on Windows. Things like print-preview can not work
anymore in those cases either and all filters stop working due to being
postscript based.[1]
SOLUTION
I thought things over a little longer after last nights irc discussion. Keep
in mind the normal implementation of code in an app, as I pasted here;
http://lists.kde.org/?l=kde-core-devel&m=118951148406712&w=2
The long term solution IMO is that applications use the KDE kcm for printer
configuration and job-queue tracking, but use a pure Qt solution for the
actual printing.
This means that KPrinter and KPrintDialog will either not be present in KDE4.0
or will be present but be deprecated in KDE4.1
The biggest advantage of depending fully on Qt for this is basically man
power; we don't need the KDE capacity to maintain 3 platforms that all have a
very different way of doing printing, which IMO is a biggy as we have seen
kdeprint getting very little love over the last 2 years or more.
Technically this makes it rather simple for KDE4.1. the KPrinter and
KPrintDialog classes are no longer needed and AFAIK this means that
kdelibs/kdeprint is no longer needed. All apps just Qt-only API for printing.
For 4.0 I suggest to create a KPrintDialog which inherits from QPrintDialog
and we add the ability to show application custom widgets there by providing a
method that apps use. (and deprecate KPrintDialog in 4.1 since Qt4.4 will
have public API for that)
1) we should note that ghostscript is capable of helping in several cases
here. But it is no panacea by a long shot.
--
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070913/69f2a752/attachment.sig>
More information about the kde-core-devel
mailing list