Leave page-ranges in for Postscript

This commit is contained in:
Anton Thomasson 2021-11-15 21:50:48 +01:00
parent 497f860aaf
commit e918b8784a
2 changed files with 6 additions and 3 deletions

View file

@ -115,7 +115,7 @@ Page {
tag: IppMsg.IntegerRange
name: "page-ranges"
prettyName: qsTr("Page range")
valid: (selectedFileType == Mimer.PDF || Mimer.isOffice(selectedFileType))
valid: (selectedFileType == Mimer.PDF || Mimer.isOffice(selectedFileType) || (_valid && selectedFileType == Mimer.Postscript))
property var pdfpages: ConvertChecker.pdfPages(selectedFile)
high: pdfpages == 0 ? 65535 : pdfpages

View file

@ -545,9 +545,12 @@ void IppPrinter::print(QJsonObject jobAttrs, QString filename)
QJsonObject PageRanges = getAttrOrDefault(jobAttrs, "page-ranges").toObject();
PageRangeLow = PageRanges["low"].toInt();
PageRangeHigh = PageRanges["high"].toInt();
// Always effected locally
// Effected locally, unless it is Postscript which we cant't render
if(documentFormat != Mimer::Postscript)
{
jobAttrs.remove("page-ranges");
}
}
qDebug() << "Final op attributes:" << o;
qDebug() << "Final job attributes:" << jobAttrs;