mirror of
https://invent.kde.org/graphics/okular
synced 2024-07-05 00:58:46 +00:00
Make sure string passed to -J is no more than 255 bytes
lpr refuses to print referencing http://tools.ietf.org/search/rfc2911#section-4.1.2 Unfortunately cutting at 255 bytes may mess up the end of the name, but oh well BUGS: 326617 FIXED-IN: 4.11.5
This commit is contained in:
parent
55011e0588
commit
5dfffec650
|
@ -430,7 +430,8 @@ QStringList FilePrinter::jobname( QPrinter &printer, const QString &version )
|
|||
}
|
||||
|
||||
if ( version.startsWith( "lpr" ) ) {
|
||||
return QStringList("-J") << printer.docName();
|
||||
const QString shortenedDocName = QString::fromUtf8(printer.docName().toUtf8().left(255));
|
||||
return QStringList("-J") << shortenedDocName;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user