![]() Registered Member ![]()
|
Am attempting to use KPrinter or QPrinter objects (on OpenSuSE 11.0) to print photos from a custom app that targets HPPhotosmart printers using cups/hplip/hpijs. Am uncertain how to get support for many paper sizes, trays, output modes, etc that are indicated in the HPPhotosmartxxxx.ppd files. For example, KPrinter/QPrinter support page size KPrinter::A6 (A6 is 297 x 420 points, or 4.13" x 5.83"); however I want to print to actual 4" x 6" photo paper. The ppd allows "Photo" which is the correct 288 x 432 points, but it appears that page size KPrinter::Photo and QPrinter::Photo are unsupported. As a temporary workaround, I've edited the ppd entry for A6 to be 288 x 432 points, or exactly 4" x 6". Other attributes such as input tray selections are present in the ppd, but are un- or incompletely-supported in KPrinter and QPrinter.
A more serious problem I have is printing edge to edge on either 4x6 or 8.5x11 paper. I can correctly scale and set the origin (0,0) for the image pixmap, but I find that somebody down the gastrointestinal tract toward the printer is stomping on my images by creating margins (1/8" top and left on 4x6; and 1/2" bottom, 1/8" left, 1/8" top on 8.5x11 paper--when viewed as portrait). The enforced 1/2" margin at the bottom of 8.5x11 might be appropriate for text documents, but is certainly not appropriate when scaling a photo to fit the entire page. I've wondered if the HP driver thinks I'm trying to print text, and is unaware that I'm trying to print a photo instead. I notice that there is a "printout mode", including "Photo" in the ppd, but don't see any corresponding method in KPrinter or QPrinter to set this mode. I have seen reference to this mode in the KPrinter setup dialog. However for various reasons, including that print preview seems to be broken, I prefer to write my own dialog--based on the appearance of the HP print dialog for Windows. As you can see, I'm feeling stumped by incomplete support in KPrinter/QPrinter for many features available in the ppd (and supposedly the printer driver). I've considered reading GIMP source code, but it's photo printing seems currently broken in various ways also. Any suggestions? Any pointers to API documentation that might help me write a new CPrinter class that would offer more complete support of ppd/driver features? |
![]() Administrator ![]()
|
You will probably find the various configuration options ( such as printout type ) in the CUPS configuration which can usually be accessed at: http://localhost:631/
There you will find stacks of options, including printer mode I believe.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thanks very much for the response. I'm aware that cups printing options can be set using http://localhost:631. However, I'm pretty committed to KDE/QT and my goal is to write my own dialog--somewhat modeled on the setup() dialogs for KPrinter and QPrinter, and also modeled on the HP print dialog in Windows. Providing a dialog from within my photo editing app should be much more convenient for the user than requiring use of the cups web page. Also, I wish to integrate a print preview with printer option settings. I'm puzzled why QPrinter and KPrinter use compiled-in enums for such items as input tray, paper size, etc, when acceptable values are in the PPD. Neither KPrinter nor QPrinter appear to support page size QPrinter::Photo, described in the PPD as 4"x6", a popular photo paper size that we commonly use around the house. QPrinter::A6 is close, but no cigar. I've discovered that hpijs is apparently responsible for margin stomping--absent some full bleed print mode. Given that KPrinter and QPrinter have the limitations they do, I'm thinking I may have to learn the CUPS API in order to get a suitable print options/preview dialog working. If you or anyone feel there are better ways to achieve my goals I'd appreciate further replies. My experience of KPrinter, QPrinter and GIMP printing is that they all have various limitations and/or are broken in some particulars. |
![]() Manager ![]()
|
|
![]() Registered Member ![]()
|
thanks for your site, its awesome and lot of interesting material. I loved this site
![]() |
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft