Don't add resolution to IPP attrs if not set when adjusting for URF

This commit is contained in:
Anton Thomasson 2021-02-18 20:08:40 +01:00
parent e5b105a3c6
commit 86b580c15f

View file

@ -426,12 +426,16 @@ void IppPrinter::print(QJsonObject attrs, QString filename, bool alwaysConvert,
{ {
HwResX = HwResY; HwResX = HwResY;
} }
if(attrs.contains("printer-resolution"))
{
QJsonObject tmpObj; QJsonObject tmpObj;
tmpObj["units"] = PrinterResolutionRef.toObject()["units"]; tmpObj["units"] = PrinterResolutionRef.toObject()["units"];
tmpObj["x"] = (int)HwResX; tmpObj["x"] = (int)HwResX;
tmpObj["y"] = (int)HwResY; tmpObj["y"] = (int)HwResY;
attrs["printer-resolution"] = QJsonObject { {"tag", IppMsg::Resolution}, {"value", tmpObj} }; attrs["printer-resolution"] = QJsonObject { {"tag", IppMsg::Resolution}, {"value", tmpObj} };
} }
}
quint32 Quality = getAttrOrDefault(attrs, "print-quality").toInt(); quint32 Quality = getAttrOrDefault(attrs, "print-quality").toInt();