Fix printing PDF as Postscript

This commit is contained in:
Anton Thomasson 2021-11-15 21:43:56 +01:00
parent b5e6042f28
commit fce3974d51
2 changed files with 3 additions and 1 deletions

View file

@ -107,6 +107,8 @@ try {
write_fun WriteFun([&cid](unsigned char const* buf, unsigned int len) -> bool
{
if(len == 0)
return true;
cid.write((const char*)buf, len);
return true;
});

View file

@ -556,7 +556,7 @@ void IppPrinter::print(QJsonObject jobAttrs, QString filename)
QByteArray contents = job.encode(IppMsg::PrintJob);
// Shouldn't and can't process these formats respectively
if(documentFormat == Mimer::JPEG || documentFormat == Mimer::Postscript)
if((mimeType == documentFormat) && (documentFormat == Mimer::JPEG || documentFormat == Mimer::Postscript))
{
emit doJustUpload(filename, contents);
}