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

Windows printing of Chinese, Japanese and special symbols is wrong

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 4.7.4, 4.8.0, 4.8.1, 4.8.2, 4.8.3, 5.0.0 Beta 1, 5.0.0 Beta 2, 5.0.0 RC 1, 5.0.0 RC 2, 5.0.0
    • None
    • Windows 7 32/64-bit
      Windows XP(with installed East Asian languages)
      Qt5 beta1, Qt5 beta2.
      Qt 4.7.4, Qt 4.8.3 SDK, QT 4 GIT

    Description

      Hello,
      in our custom QtWebKit browser users can print their html e-mails and other html pages. It works good for unicode(utf-8) htmls with standard characters in german, english, russian and over languages. But if there is any special unicode symbols or if html contains chinese or japanese language characters, printer output is totally broken. We have tested this with standard windows printing system(XPS printer), with some over physical printers and with pdf printer too(PDFCreator).

      Output is broken only for QPrinter::NativeFormat and QPrinter::PostScriptFormat. Using QPrinter::PdfFormat outputs file without errors. Also, it is broken only on windows systems(tested on Windows XP and Windows 7 32-/64-bit). Printer output on linux doesn't have this problem. Mac OS isn't tested.

      If you zoom printed with XPS or pdf-printer document you can see what chinese/japanese and special symbols are printer atop of previous standard characters. I have added zoomed screenshot named printing_nativeformat_zoom.jpeg to archive for clarity.

      Attached archive contains simple Qt4 test project which prints html page two time:
      first time with native format
      second time with pdf format to the file

      Other files included:
      print.html - is an example html page with some special symbols and japanese symbols.

      printing_nativeformat.jpeg - is an screenshot of broken printout with native format and Microsoft XPS printer.
      printing_nativeformat_zoom.jpeg - zoomed printout of native format with Microsoft XPS printer.
      printing_pdfformat.jpeg - screenshot of file created with QPrinter::PdfFormat which contains no error.
      printing_webview.jpeg - screenshot of QWebView widget with print.html file loaded.

      P.S.: For included Qt project: make sure you have copied print.html file into the same folder where the created executable is. pdf file will be created in the same folder with following filename: print.html.pdf

      Thank you in advance!

      Attachments

        1. printing_nativeformat_zoom.jpeg
          142 kB
          Dzianis Shman
        2. printing_nativeformat.jpeg
          360 kB
          Dzianis Shman
        3. printing_pdfformat.jpeg
          317 kB
          Dzianis Shman
        4. printing_webview.jpeg
          224 kB
          Dzianis Shman
        5. PrintingBUG.zip
          941 kB
          Dzianis Shman

        Issue Links

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

          Activity

            People

              johnlayt John Layt
              acerextensa Dzianis Shman
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes