libkdeprint

John Layt johnlayt at yahoo.com.au
Sun Oct 28 09:45:26 GMT 2007


On Saturday 27 October 2007, Alex Merry wrote:
>
> How's this going?  Do we have anything yet?  If not, do you have an ETA?
>
> Alex

Hi,

Attached is the current version of my printFiles() replacement.  The code 
makes use of the fact that CUPS installs its own version of lpr that 
re-directs output to CUPS, so the same code does for both CUPS and LPR, and 
has no compile-time dependency on CUPS.  Because the code isn't going into 
kdelibs, and its easiest to just directy compile it into Okular which is GPL, 
no code is copied from the LGPL KDEPrint.

What works in Okular:
1) Printing files :-)
2) Continuous page ranges selcted in the Print Dialog
3) Bookmarking non-continuous pages in Okular and choosing Selection in the 
Print Dialog

What's left to do:
1) There's a weird bug I'm tearing my hair out on.  If I don't pass the 
Printer Name and have a default set in CUPS, then everything works.  If I 
pass the selected Printer Name however I get an error "lpr: The printer or 
class was not found", but if I copy and paste the exact same command line 
then it works fine.  Any clues?
2) Auto-detect between CUPS and real LPR and don't pass CUPS options if not 
CUPS.
3) Sort out issues with deleting files and number of copies
4) Test all options

What won't ever work:
1) Passing through certain Print Driver options that QPrinter/QPrintDialog 
doesn't expose and/or lpr doesn't support, such as choosing print quality 
(Draft/Normal/Photo).

Once the final issues are sorted out and I'm happy with the Okular usage, I'll 
send the patches to Pino for review before commiting.

Cheers!

John.

--

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fileprinter.cpp
Type: text/x-c++src
Size: 10534 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071028/82c583e7/attachment.cpp>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fileprinter.h
Type: text/x-c++hdr
Size: 4998 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071028/82c583e7/attachment.h>


More information about the kde-core-devel mailing list