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

html2pdf Conversion Issue with image Assets

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P2: Important
    • None
    • 6.2.12
    • None
    • Linux/Wayland, Linux/X11

    Description

      Description:

      During the conversion of HTML webpages to PDF using the html2pdf example, image assets, including .jpg, .png, etc files, intermittently fail to display in the final output PDF file. In some instances, the images appear as broken image placeholders, while in others, there is simply a blank space at their designated location within the PDF document.

      Steps to Reproduce:

      1.  build example: WebEngine Widgets Html2Pdf Example
      2. Run the built binary using the following command: 
        ./html2pdf https://qt.io output.pdf
      1. Check the output.pdf file you'll observe Issues with image assets

      Expected Behavior: The converted PDF file should consistently display all image assets, in their respective locations within the PDF document without any issues. Images should be properly embedded and visible.

      Actual Behavior: In the converted PDF file, image assets intermittently fail to display correctly. Some images appear as broken image placeholders, while others result in blank spaces at their designated locations within the PDF document.

      Environment:

      OS: Ubuntu 22.04 

      PDF viewer: Evence- GNOME Document Viewer 42.3, chrome web browser

      Note: please check the attached Images and output pdf file for reference:

      Attachments

        1. broken images.png
          31 kB
          Alber Rizwan
        2. expect for missing images.png
          9 kB
          Alber Rizwan
        3. missing images.png
          4 kB
          Alber Rizwan
        4. output.pdf
          1.14 MB
          Alber Rizwan

        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
              alrizwan Alber Rizwan
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes