diff --git a/qml/pages/utils.js b/qml/pages/utils.js index bfdbd4a..746f298 100644 --- a/qml/pages/utils.js +++ b/qml/pages/utils.js @@ -260,6 +260,12 @@ function canTransferPdfAs(type) return has(targets, type) } +function canTransferPostscriptAs(type) +{ + var targets = ["application/octet-stream", "application/postscript"]; + return has(targets, type) +} + function canConvertImageTo(type) { var targets = ["application/octet-stream", "image/jpeg", "image/png", "image/pwg-raster", "image/urf", "image/gif"]; @@ -288,6 +294,10 @@ function limitChoices(name, choices, mimeType, ConvertChecker) } } + else if(mimeType == "application/postscript") + { + return choices.filter(canTransferPostscriptAs) + } else if(mimeType.indexOf("image") != -1) { return choices.filter(canConvertImageTo); diff --git a/src/ippprinter.cpp b/src/ippprinter.cpp index 13fae99..16fa540 100644 --- a/src/ippprinter.cpp +++ b/src/ippprinter.cpp @@ -309,6 +309,10 @@ QString targetFormatIfAuto(QString documentFormat, QString mimeType, QJsonArray { return firstMatch(supportedMimeTypes, {"application/pdf", "application/postscript", "image/pwg-raster", "image/urf" }); } + else if(mimeType == "application/postscript") + { + return firstMatch(supportedMimeTypes, {"application/postscript"}); + } else if (mimeType.contains("image")) { QStringList ImageFormatPrioList {"image/png", "image/gif", "image/pwg-raster", "image/urf", "image/jpeg"};