Common Printing Dialog: Test it!
The code for the Common Printing dialog is currently hosted at OpenPrinting. It should later get part of the major desktops.
Browse the code for the dialog's UI in our Bazaar repository.
Download it with
To compile and run, do (you need the development packages (*-dev or *-devel) for KDE 4.0: Qt, QtDBus, kdelibs, cups, and poppler-qt4. It uses QWidgets on QGraphicsView, so it needs Qt >= 4.4.0):
rm -rf build mkdir build cd build cmake .. make cd ../kde4-dialog
On Ubuntu Hardy use the following "cmake" command:
cmake -DCMAKE_INSTALL_PREFIX=/usr/lib/kde4 ..
To run the dialog, use the following command:
If you now run a client program (like qt-client), a dialog will appear. If you just want to view the dialog (i.e. when demonstrating it to someone), use this:
../build/kde4-dialog/view-dialog --previewfile <PDF file> &
<PDF file> will be used for the preview.
There is also a GTK-based version of the dialog. To build it, edit the reference to a PDF file in printdialog.c to an existing PPD file and do
cd gtk-dialog make ./glib-dialog -f <PDF file> [-p <PPD file>]
You need to libcups2-dev, libpoppler-glib-dev, libpoppler-dev, and the *-dev files for GTK apps being installed.
Browse the code for the interface between the applications and the printing dialog (CPDAPI) here
and download it via
bzr branch http://bzr.openprinting.org/misc/cpdapi
To test the code, run the following commands (the packages "cmake" and "libqt4-dev" must be installed, qmake must point to the Qt4 version, remove the package "qt3-dev-tools" or do "update-alternatives --config qmake"):
rm -rf build mkdir build cd build cmake .. make qt-dialog/qt-dialog & qt-client/qt-client qt-dialog/qt-dialog & ../simple-client.py