Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. html2pdf fails to load web URL
Forum Update on Monday, May 27th 2025

html2pdf fails to load web URL

Scheduled Pinned Locked Moved Unsolved QtWebEngine
5 Posts 3 Posters 942 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • _ Offline
    _ Offline
    __ns
    wrote on 8 Nov 2023, 05:59 last edited by
    #1

    Hello,
    I have built Qt 5.15 and 6.2.2 on Windows and Linux. Trying html2pdf. It works on Windows in both versions.
    On Linux, Redhat, it is not working. Fails to load the web page.
    In Qt5, there is no error coming out, it just fails.
    In Qt6, I see js: crbug/1173575, non-JS module files deprecated.

    I have proxy set and it is working fine. When doing a wget to download the web page or write a Qt example which uses QNetworkAccessManager to download the same web page on Linux works.
    But html2pdf examples just fails to download the page. There is no information coming out which tell's exactly what is missing.

    There is one post in the forum with the same error but that solution did not work.
    [https://forum.qt.io/topic/146993/js-crbug-1173575-qwebengineview/3](link url)

    Any help will be appreciated.

    Thanks,
    NS

    J 1 Reply Last reply 8 Nov 2023, 06:22
    0
    • _ __ns
      8 Nov 2023, 05:59

      Hello,
      I have built Qt 5.15 and 6.2.2 on Windows and Linux. Trying html2pdf. It works on Windows in both versions.
      On Linux, Redhat, it is not working. Fails to load the web page.
      In Qt5, there is no error coming out, it just fails.
      In Qt6, I see js: crbug/1173575, non-JS module files deprecated.

      I have proxy set and it is working fine. When doing a wget to download the web page or write a Qt example which uses QNetworkAccessManager to download the same web page on Linux works.
      But html2pdf examples just fails to download the page. There is no information coming out which tell's exactly what is missing.

      There is one post in the forum with the same error but that solution did not work.
      [https://forum.qt.io/topic/146993/js-crbug-1173575-qwebengineview/3](link url)

      Any help will be appreciated.

      Thanks,
      NS

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 8 Nov 2023, 06:22 last edited by
      #2

      @__ns You could build debug version of html2pdf and run through debugger to see what happens.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      _ 1 Reply Last reply 10 Nov 2023, 10:14
      0
      • J jsulm
        8 Nov 2023, 06:22

        @__ns You could build debug version of html2pdf and run through debugger to see what happens.

        _ Offline
        _ Offline
        __ns
        wrote on 10 Nov 2023, 10:14 last edited by
        #3

        @jsulm I tried that and the code was overwhelming, especially async which make's it hard to debug when you do not have any background of Qt internal's. I will see if someone has a clue otherwise that might be one approach, not sure how much successful I will be. Thanks for looking.

        J 1 Reply Last reply 10 Nov 2023, 10:39
        0
        • _ __ns
          10 Nov 2023, 10:14

          @jsulm I tried that and the code was overwhelming, especially async which make's it hard to debug when you do not have any background of Qt internal's. I will see if someone has a clue otherwise that might be one approach, not sure how much successful I will be. Thanks for looking.

          J Offline
          J Offline
          JonB
          wrote on 10 Nov 2023, 10:39 last edited by
          #4

          @__ns
          There are so many possibilities it's difficult to know where tot start. One question: do you need/want to use html2pdf? There are various ways to convert to PDF within Qt itself. For example, even from 11 years ago there is https://stackoverflow.com/questions/10697228/converting-html-to-pdf-with-qt. Do you want to test that works? First against local file like it does, then alter to fetch from URL? First against a tiny HTML file, then against your particular HTML content?

          1 Reply Last reply
          0
          • _ Offline
            _ Offline
            __ns
            wrote on 16 Nov 2023, 05:33 last edited by __ns
            #5

            @JonB Thanks for looking. Yes, I need to convert HTML to PDF. Agree, possibilities are many and this is not a clear question with a straight answer. I just posted in case someone had hit something like this before or someone in the know how of Qt WebEngine might have some pointers for me. I had tried printing the HTML to PDF using QPrinter and it was not satisfactory even with a basic html.
            I was reading QtWebEngine and internally Chromium does not use QNetworkAccessManager (like Qt WebKit). It has its own implementation of network and this is what I feel is failing somewhere on Linux. So eventually if I have to figure out, I probably will have to debug inside Chromium to see what is happening.
            PS: For now there is a solution with Qt WebKit and so not super urgent but eventually I might have to figure out the Qt WebEngine solution.

            1 Reply Last reply
            0

            1/5

            8 Nov 2023, 05:59

            • Login

            • Login or register to search.
            1 out of 5
            • First post
              1/5
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved