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

Texts in generated PDF documents can't be displayed by many Linux viewers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 6.0.0
    • Fix Version/s: 6.0.1, 6.1.0 Alpha
    • Component/s: PDF
    • Labels:
      None
    • Platform/s:
      All
    • Commits:
      05706bd2b005dd159be34107cc43c92e7f12eb35 (qt/qtbase/dev) 38159913b88dd894d22c4522df23035a7965e58d (qt/qtbase/6.0)

      Description

      Texts in PDF documents being generated with QPdfWriter/Qt6 can't be processed by many PDF viewers on my Linux box. Using the same code for generating the document with Qt5 leads to documents, that do not have this problem.

      ( Problem happens on current OpenSuSE and Debian systems - I can look up specific library versions in case of interest )

      The only viewer that might work properly is chromium - at least I can see no warnings.

      gv is able to show something, but is giving the same warning as pdf2ps ( see below ).

      firefox fails giving a warning: "This PDF document might not be displayed properly".

      evince spits out the warning: "some font thing failed"

      pdf2ps fails with the following:

            • Error: can't process embedded font stream,
              attempting to load the font using its name.
              Output may be incorrect.

      qpdfview fails with the following warnings:

      "Error: Couldn't create a font for 'TeXGyreHeros-Bold'"
      ...


      Attached you find a small demo creating a PDF document with a text and the output when running it with Qt5 and Qt6,

        Attachments

        1. pdfproblem.cpp
          0.5 kB
        2. test.pdf
          5 kB
        3. test-qt5.pdf
          5 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            srutledg Shawn Rutledge
            Reporter:
            uwe Uwe Rathmann
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes