Bug 281719

Summary: Wizard -> Page Setup -> Paper Size: Use QPrinterInfo to get the printer's supported paper sizes instead of QPrinter defaults (or: cropping issues with photo paper)
Product: [Applications] digikam Reporter: Thomas Kuther <gimpel>
Component: Plugin-Generic-PrintCreatorAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: anaselli, caulier.gilles
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Gentoo Packages   
OS: Linux   
Latest Commit: Version Fixed In: 2.5.0
Sentry Crash Report:

Description Thomas Kuther 2011-09-09 22:02:27 UTC
Version:           unspecified (using KDE 4.7.1) 
OS:                Linux

I'm having some trouble with cropping images and print them on photo paper using the wizard.
The region I select in the cropping page doesn't match what ends up on the photo paper in the end (mostly 10x15cm in my case).

I think it's because in the first page of the wizard, where you select the printer/fileformat, in "page setup" you only have a list of paper sizes provided by the QPrinter class. When selecting "Custom" I cannot enter/change any values, so I leave it at A4.

In the standard printer dialog after the wizard, all known paper sizes are shown correctly.

I looked around the code a bit, and found this:
http://doc.qt.nokia.com/latest/qprinterinfo.html
-> QList<QPrinterInfo> QPrinterInfo::availablePrinters ()
and:
-> QList<QPrinter::PaperSize> QPrinterInfo::supportedPaperSizes () const

Could this be used in the wizard to gather supported paper sizes for the real printers?

Reproducible: Always

Steps to Reproduce:
1. Start print wizard
2. select (real) printer, correct paper size isn't available in "page setup" dialog
3. select "full page" profile
4. on cropping page slect a region of the image (e.g. quite in the middle)
5. finish wizard, in printer dialog now one can select correct paper size
6. print it

Actual Results:  
cropping wrong on the printout

Expected Results:  
print comes out as shown on cropping page of the wizard

If it matters, I use an Epson PX720WD and tested both Avasys and Gutenprint drivers.
Comment 1 Angelo Naselli 2011-09-24 15:20:34 UTC
How many printer do you have installed in the system just out of curiosity?

I tried in the past using methods you suggested but the resulted pages were always for the default printer and not for the right one, i've also open a bug against QT, that is opened yet... i will check it if something has changed...

Custom page size is enabled only in some drivers, i tried a lot of HP printers and i have never seen it enabled. I tried to force it, but the output was not as expected so i haven't released it.
Comment 2 Thomas Kuther 2011-10-05 12:49:19 UTC
Ah nice. I have one printer, but configured twice with different drivers in cups, and none of both has been set as the default printer.

Now that I set one of them as default, it indeed shows that printer's supported paper sizes.

So the real issue is like you say: page setup only shows the default printer's settings. I had no default printer set, so it showed only pages sizes supported by "print to file", which was selected by default.

Thank you!
Comment 3 caulier.gilles 2011-12-22 10:06:02 UTC
Thomas,

This file still valid using kipi-plugins 2.4 ?

Gilles Caulier
Comment 4 Thomas Kuther 2011-12-30 13:52:15 UTC
Using kipi-plugins 2.4 it shows the correct page settings of the selected printer/output file format.

So the issue is fixed.

Thanks a lot, Gilles!
Comment 5 Angelo Naselli 2012-06-27 09:23:38 UTC
hmm but QPrinterInfo problem should be in yet, or am i wrong? I don't have two printer here to test...