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

Print to PDF with styled tables won't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 5.11.2
    • 5.10.1, 5.11.0
    • WebEngine
    • None

      Hi all,

      I've detected several bugs related to the [printToPdf function from QWebEnginePage.

      If you have a styled table like the following minimalistic HTML Code, the function won't save a PDF.

      <!DOCTYPE html>
      <html>
      <head>
      <style>
      table, th, td {
      border: 1px solid black;
      }
      </style>
      </head>
      <body>
      
      <table>
      <tr>
      <th>Month</th>
      <th>Savings</th>
      </tr>
      </table>
      
      </body>
      </html>

      At least it's the border attribute at tables which leads to this bug. Furthermore the signal pdfPrintingFinished won't be executed.

      Based on this bug, there is no indicator what went wrong during the translation from HTML to PDF.

      I tried the translation via the example html2pdf.

      Best regards,
      Mike

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

            qt_webengine_team Qt WebEngine Team
            lachrymology Mike
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes