diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index 0df88198a4d..96ed769ce3b 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -1911,7 +1911,8 @@ void QPdfEnginePrivate::writeAttachmentRoot() attachments.push_back(addXrefEntry(-1)); xprintf("<<\n" - "/F (%s)", attachment.fileName.toLatin1().constData()); + "/F "); + printString(attachment.fileName); xprintf("\n/EF <>\n" "/Type/Filespec\n"