Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-122768

QPdfWriter printing out RTF documents can cause garbled characters.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2
    • GUI: Printing
    • None
    • windows10
    • Windows

    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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            zuoweiyin yin zuowei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes