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

Print to PDF with styled tables won't work

    XMLWordPrintable

Details

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

    Description

      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

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes