Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.2
-
None
-
windows10
Description
QPdfWriter printing out RTF documents can cause garbled characters.
My original rft file, input.rtf in the code directory, has a character encoding of Utf8
Printing as PDF output using QPdfWriter may result in some titles being garbled.
In the attachment, I have provided a minimal testing example based on the Windows platform. In the example, there is an input.rft file, and the test results are in the d:/output test.pdf file. Please ensure that your computer has a hard drive, otherwise the result file may not be visible.
The test example in the code, input.rft, is also generated by QT's rich text, not written by me personally. This rich text can be opened in Word without any issues, so the possibility of RTF formatting errors can be ruled out.
Finally, my QT version is QT5.15.2.