Make sure QPrinter::Folio maps to the right paper size on Windows

Since there are two different Folio specifications (Adobe and Microsoft)
then we need to ensure we consistently use the same one across all
platforms. Therefore we change the one on Windows to match the
corresponding standard paper and add a note explaining how to get the
DMPAPER_FOLIO size.

Change-Id: I0f20ba5598ef8f680125fcd33dbc6924bd521d75
Reviewed-by: John Layt <jlayt@kde.org>
This commit is contained in:
Andy Shaw 2013-08-09 15:06:51 +02:00 committed by The Qt Project
parent 040fa04882
commit 74a0cb417f
2 changed files with 5 additions and 2 deletions

View File

@ -89,7 +89,7 @@ static const struct {
{ DMPAPER_A5, QPrinter::A5 },
{ DMPAPER_B4, QPrinter::B4 },
{ DMPAPER_B5, QPrinter::B5 },
{ DMPAPER_FOLIO, QPrinter::Folio },
{ DMPAPER_A4_PLUS, QPrinter::Folio },
{ DMPAPER_ENV_10, QPrinter::Comm10E },
{ DMPAPER_ENV_DL, QPrinter::DLE },
{ DMPAPER_ENV_C3, QPrinter::C5E },
@ -103,7 +103,6 @@ static const struct {
{ DMPAPER_A_PLUS, QPrinter::A4 },
{ DMPAPER_B_PLUS, QPrinter::A3 },
{ DMPAPER_LETTER_PLUS, QPrinter::Letter },
{ DMPAPER_A4_PLUS, QPrinter::A4 },
{ DMPAPER_A5_TRANSVERSE, QPrinter::A5 },
{ DMPAPER_B5_TRANSVERSE, QPrinter::B5 },
{ DMPAPER_A3_EXTRA, QPrinter::A3 },

View File

@ -388,6 +388,10 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke
With setFullPage(false) (the default), the metrics will be a bit
smaller; how much depends on the printer in use.
\note QPrinter::Folio is the Adobe specification for the Folio size.
On Windows if you want to use the same as DMPAPER_FOLIO then you should use
setPaperSize(QSizeF(8.5, 13), QPrinter::Inch).
\omitvalue NPageSize
\omitvalue NPaperSize
*/