Fix printing PDF as Postscript
This commit is contained in:
parent
b5e6042f28
commit
fce3974d51
2 changed files with 3 additions and 1 deletions
|
@ -107,6 +107,8 @@ try {
|
||||||
|
|
||||||
write_fun WriteFun([&cid](unsigned char const* buf, unsigned int len) -> bool
|
write_fun WriteFun([&cid](unsigned char const* buf, unsigned int len) -> bool
|
||||||
{
|
{
|
||||||
|
if(len == 0)
|
||||||
|
return true;
|
||||||
cid.write((const char*)buf, len);
|
cid.write((const char*)buf, len);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
|
@ -556,7 +556,7 @@ void IppPrinter::print(QJsonObject jobAttrs, QString filename)
|
||||||
QByteArray contents = job.encode(IppMsg::PrintJob);
|
QByteArray contents = job.encode(IppMsg::PrintJob);
|
||||||
|
|
||||||
// Shouldn't and can't process these formats respectively
|
// 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);
|
emit doJustUpload(filename, contents);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue