Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Html to pdf- when try to convert html contains frames it produces Empty page
Forum Updated to NodeBB v4.3 + New Features

Html to pdf- when try to convert html contains frames it produces Empty page

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 2 Posters 836 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.
  • S Offline
    S Offline
    Shidharth
    wrote on last edited by
    #1

    Hi All,

    I have a application htmltopdf using webkit. but when I have try to convert a html page that contains frames it produce empty output pdf. But normal html pages it works as expected. I have attched my input html text.

    main.html

    <!DOCTYPE html>
    <html>
    <head>
    <title>a simple frameset document</title>
    </head>
    <frameset cols="20%, 80%">
    <frame src="frame1.html">
    <frame src="frame2.html">
    </frameset>
    <body style="height: 1000px; width: 1000px">
    </body>
    </html>

    Frame1.html

    <html>
    <head></head>
    <body>
    <div><h1>hello world</h1></div>
    <h2>browsers</h1>
    ->Mozila Firefox<br>
    ->Google Chrome<br>
    ->Internet explorer<br>

    <h1>Webkit</h1>
    WebKit is a layout engine software component for rendering web pages in web browsers. It powers Apples Safari web browser, and a fork of the project is used by Chromium-based browsers, such as Opera or Google Chrome.
    </body>
    </html>

    Frame2.html

    <html>
    <head></head>
    <body>
    <div><h1>hello world</h1></div>
    This is a left side frame. It works fine in browsers.
    Complete solution for creating and sharing interactive dashboards
    Easy to use dashboard designer application
    View, manage, and share dashboards through a web interface
    Free community license available
    <br><br>
    --->Google<br><br>
    Google Inc. is an American multinational technology company specializing in Internet-related services and products. These include online advertising technologies, search, cloud computing, and software.
    The British Broadcasting Corporation (BBC) is the public service broadcaster of the United Kingdom, headquartered at Broadcasting House in London.
    <br><br>
    --->CNN<br><br>
    The Cable News Network (CNN) is an American basic cable and satellite television channel that is owned by the Turner Broadcasting System division of Time Warner.[1] The 24-hour cable news channel was founded in 1980 by American media proprietor Ted Turner.
    </body>
    </html>

    Regards,
    Siddharth.

    raven-worxR 1 Reply Last reply
    0
    • S Shidharth

      Hi All,

      I have a application htmltopdf using webkit. but when I have try to convert a html page that contains frames it produce empty output pdf. But normal html pages it works as expected. I have attched my input html text.

      main.html

      <!DOCTYPE html>
      <html>
      <head>
      <title>a simple frameset document</title>
      </head>
      <frameset cols="20%, 80%">
      <frame src="frame1.html">
      <frame src="frame2.html">
      </frameset>
      <body style="height: 1000px; width: 1000px">
      </body>
      </html>

      Frame1.html

      <html>
      <head></head>
      <body>
      <div><h1>hello world</h1></div>
      <h2>browsers</h1>
      ->Mozila Firefox<br>
      ->Google Chrome<br>
      ->Internet explorer<br>

      <h1>Webkit</h1>
      WebKit is a layout engine software component for rendering web pages in web browsers. It powers Apples Safari web browser, and a fork of the project is used by Chromium-based browsers, such as Opera or Google Chrome.
      </body>
      </html>

      Frame2.html

      <html>
      <head></head>
      <body>
      <div><h1>hello world</h1></div>
      This is a left side frame. It works fine in browsers.
      Complete solution for creating and sharing interactive dashboards
      Easy to use dashboard designer application
      View, manage, and share dashboards through a web interface
      Free community license available
      <br><br>
      --->Google<br><br>
      Google Inc. is an American multinational technology company specializing in Internet-related services and products. These include online advertising technologies, search, cloud computing, and software.
      The British Broadcasting Corporation (BBC) is the public service broadcaster of the United Kingdom, headquartered at Broadcasting House in London.
      <br><br>
      --->CNN<br><br>
      The Cable News Network (CNN) is an American basic cable and satellite television channel that is owned by the Turner Broadcasting System division of Time Warner.[1] The 24-hour cable news channel was founded in 1980 by American media proprietor Ted Turner.
      </body>
      </html>

      Regards,
      Siddharth.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @Shidharth
      more interesting than the content HTML would be the code you use for printing.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Shidharth
        wrote on last edited by
        #3

        I think webkit cannot find height of the html because there is two htmls in a frame

        1 Reply Last reply
        0

        • Login

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