diff --git a/qml/pages/PrinterPage.qml b/qml/pages/PrinterPage.qml index 33154d3..9de3746 100644 --- a/qml/pages/PrinterPage.qml +++ b/qml/pages/PrinterPage.qml @@ -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} diff --git a/src/ippprinter.cpp b/src/ippprinter.cpp index 6d5f12c..a744821 100644 --- a/src/ippprinter.cpp +++ b/src/ippprinter.cpp @@ -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;