Fix Postscript printing
This commit is contained in:
parent
40b1be8aab
commit
276b9d2759
2 changed files with 14 additions and 0 deletions
|
@ -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);
|
||||
|
|
|
@ -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"};
|
||||
|
|
Loading…
Reference in a new issue