mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-02 14:14:10 +00:00
Pass down to lpr the printer margins
This makes automagically work the printing on printers with hard-margins since the QPrinter dialog margins are initialized to the printer hard-margins. If you still want the old and mostly unuseful behaviour of not having any margin (and thus your printer not printing things on the borders) you can always set the margins to 0 in the dialog BUGS: 319476 FIXED-IN: 4.12.0
This commit is contained in:
parent
4caa0ef20b
commit
5a1afc51e3
|
@ -506,6 +506,10 @@ QStringList FilePrinter::cupsOptions( QPrinter &printer, QPrinter::Orientation d
|
|||
optionList << optionCollateCopies( printer );
|
||||
}
|
||||
|
||||
if ( ! optionPageMargins( printer ).isEmpty() ) {
|
||||
optionList << optionPageMargins( printer );
|
||||
}
|
||||
|
||||
optionList << optionCupsProperties( printer );
|
||||
|
||||
return optionList;
|
||||
|
@ -650,7 +654,7 @@ QStringList FilePrinter::optionPageMargins( QPrinter &printer )
|
|||
return QStringList("-o") << QString("page-left=%1").arg(l)
|
||||
<< "-o" << QString("page-top=%1").arg(t)
|
||||
<< "-o" << QString("page-right=%1").arg(r)
|
||||
<< "-o" << QString("page-bottom=%1").arg(b);
|
||||
<< "-o" << QString("page-bottom=%1").arg(b) << "-o" << "fit-to-page";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue