KDE Print: Developer Tutorial Now Available

A tutorial on programming with the KDEPrint module has been made available on the KDE Print web site. The tutorial is intended for application developers who wish to make use of KDEPrint within their applications. It covers the basic usage as well as more advanced features such as the print dialog customization or the automatic preview mechanism. The tutorial is illustrated with code examples and screenshots. Most of the code examples are taken from a demo application (a small image viewer), available for download. Enjoy!


Slightly OT - Is there a user way to print an image with precise measurments? I have some VCR labels, and I want to print them out with a specific height and width. I finally imported into KWord, but it seems to me there should be a quick and easy way to do it in KView or something.

If not, I'll probably make a quick and dirty cover / label printing app by hacking the example code. I print four or five labels a week. Stop me if such a beast exists.

(I've also found that the global imperial versus metric measurements settings are not recognized by several apps. I need to add that, plus a bundle of (very minor, mostly cosmetic) xinerama bugs. Plus the only annoying bug in 3.0 - an odd "you can only rename one file" bug).

Evan "Very pleased with 3.0" E.

By Evan "JabberWok... at Wed, 2002/04/10 - 5:00am

Actually, the KPrinter object resolution defines the real size of the printed image. A 300 pixels image will be 4 inches wide when printed with 75 dpi resolution. So, programmatically, you can either set the KPrinter resolution manually so that your image have the correct size, or rescale your image according the KPrinter resolution.

About the availability of such a feature in existing tools, the demo application I wrote does it (I actually also missed that feature to print CD covers, that's why I implemented it). Normally, kuickshow should also implement something like that in future versions.


By Michael Goffioul at Wed, 2002/04/10 - 5:00am

Here's an idea: since CDs have a standard dimension how about having a print format for it just like for A4, Legal and bunch of envelopes. Just a thought


By Karim at Wed, 2002/04/10 - 5:00am

Many thanks to the author(s) of the tutorial!
Now I have to leave, there's some source waiting for me...

By none at Wed, 2002/04/10 - 5:00am

Michael Goffioul is the author of the tutorial and I'd like to say another thanks to him for creating (singlehandedly as I can understand) the amazing KDEprint module! Excellent job!

By matt at Wed, 2002/04/10 - 5:00am

> Michael Goffioul is the author of the tutorial and I'd like to say
> another thanks to him for creating (singlehandedly as I can understand)

I recently met him -- fortunately he has still both hands in good health... ;-)

But he did it single-"headedly" by and large!

> the amazing KDEprint module! Excellent job!

Definitely true. I myself was in for it from the beginning just because
its excellent CUPS support. This fascinated me so much (and still does)
that I tend to be blind to KDEPrint's overall architecture, which is highly
modular, very flexible and extremly versatile. Just look at the support
for different print subsystems (print engines) between which you can even
switch "on the fly"! Or the "special printers", the "external filter plugin
interface" and many new features... And gosh!, the guy is still delivering
new stuff by the week into CVS-HEAD...

By Kurt Pfeifle at Wed, 2002/04/10 - 5:00am

What's happened ? With kde 2.2.2, I can choose the encodage with kedit (I can't choose utf-8 unfortunately, but ISO-8859-3 is one of the possibility), but now, with kde 3.0, I can't choose the encode with kedit, kwrite, kate. Hey, you simply not use different encodage. Personnaly, I need to be able to edit ISO-8859-15, ISO-8859-3 and UTF-8 text file, why is it impossible ? It's not very serious :((

By off topic man at Sat, 2002/04/13 - 5:00am

Mi opinias same : tio estas tre nemalhavebla :( Kiel skribus, ?o a? ?o, kun kedit-o kaj kwrite-o, sen UTF-8a kaj ISO-8859-3a ?

By D-ro E. at Mon, 2002/04/15 - 5:00am

i am a programing white kde developer
please help me to write a program

By amir sadughi at Sun, 2002/10/20 - 5:00am

I'm not against helping you, but maybe:
1) you should describe more explicitely your problem
2) you should use the KDE development mailing list


By Michael Goffioul at Mon, 2002/10/21 - 5:00am