Fix sides and color-mode settings
This commit is contained in:
parent
75cb01961b
commit
2131cd4c5f
2 changed files with 7 additions and 12 deletions
|
@ -38,12 +38,12 @@ Page {
|
|||
|
||||
ListModel {
|
||||
id:mod
|
||||
ListElement {name: "sides"; prettyName: qsTr("Sides"); tag: IppMsg.Enum}
|
||||
ListElement {name: "sides"; prettyName: qsTr("Sides"); tag: IppMsg.Keyword}
|
||||
ListElement {name: "media"; prettyName: qsTr("Print media"); tag: IppMsg.Keyword}
|
||||
ListElement {name: "copies"; prettyName: qsTr("Copies"); tag: IppMsg.Integer}
|
||||
ListElement {name: "multiple-document-handling"; prettyName: qsTr("Collated copies"); tag: IppMsg.Keyword}
|
||||
ListElement {name: "page-ranges"; prettyName: qsTr("Page range"); tag: IppMsg.IntegerRange}
|
||||
ListElement {name: "print-color-mode"; prettyName: qsTr("Color mode"); tag: IppMsg.Enum}
|
||||
ListElement {name: "print-color-mode"; prettyName: qsTr("Color mode"); tag: IppMsg.Keyword}
|
||||
// ListElement {name: "orientation-requested"; prettyName: qsTr("Orientation"); tag: IppMsg.Enum}
|
||||
ListElement {name: "print-quality"; prettyName: qsTr("Quality"); tag: IppMsg.Enum}
|
||||
ListElement {name: "printer-resolution"; prettyName: qsTr("Resolution"); tag: IppMsg.Resolution}
|
||||
|
|
|
@ -441,19 +441,14 @@ void IppPrinter::print(QJsonObject attrs, QString filename, bool alwaysConvert,
|
|||
}
|
||||
|
||||
QString Sides = getAttrOrDefault(attrs, "sides").toString();
|
||||
if(documentFormat=="image/pwg-raster" || documentFormat=="image/urf")
|
||||
{
|
||||
attrs.remove("sides");
|
||||
attrs.remove("print-color-mode");
|
||||
attrs.remove("page-ranges");
|
||||
}
|
||||
else if(documentFormat == "application/postscript")
|
||||
{
|
||||
attrs.remove("sides");
|
||||
if(documentFormat=="image/pwg-raster"
|
||||
|| documentFormat=="image/urf"
|
||||
|| documentFormat == "application/postscript")
|
||||
{ // Effected locally
|
||||
attrs.remove("page-ranges");
|
||||
}
|
||||
else if (documentFormat == "application/pdf")
|
||||
{
|
||||
{ // Only effected locally if really needed
|
||||
if(attrs.contains("page-ranges") && !_attrs.contains("page-ranges-supported"))
|
||||
{
|
||||
pdfPageRangeAdjustNeeded = true;
|
||||
|
|
Loading…
Reference in a new issue