Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Printing issues in IE with framesets

Printing issues in IE with framesets

Scheduled Pinned Locked Moved Web Development
javascripthtmlhelpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • 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.
  • G Offline
    G Offline
    Gerben Jongerius
    wrote on last edited by
    #1

    On one of the webapplications I'm working on we have an option to open a popup for printing pages. This popup first gives you several options followed by a page with a frameset on it. Which is something similar to this:

    printing
    

    Where the message.html contains the a text and is refreshed to a button to close the popup. The other frame contains the actual content that will be printed using javascript in the onload frame. The page being printed has some rather large (specifically wide) tables on it, which causes the content not to fit on the A4 its printed on. It looks as if IE does not rescale the content of the frame to fit the A4 printer output when using a frameset or something. The weird part I can't figure out is that if I remove the frameset in a test it works and the content of the content-to-print.html page fits on the A4 paper. I changed it to something like this:

    printing
    

    Printing content

    </body>
    </html>
    </pre>

    I've tried playing with the DOCTYPE from loose to strict as well as removing it all together. The loose and strict did have some positive effect but didn't remove the problem completely.

    Now I know that using framesets is old school, but in this case its not that easy to remove them all. That would take to much time and affect to many parts of the web application. So how can I tell IE to print the exact same way when using a frameset as it does with the iframe solution. Is this at all possible.</x-turndown>

    C 1 Reply Last reply
    0
    • G Gerben Jongerius

      On one of the webapplications I'm working on we have an option to open a popup for printing pages. This popup first gives you several options followed by a page with a frameset on it. Which is something similar to this:

      printing
      

      Where the message.html contains the a text and is refreshed to a button to close the popup. The other frame contains the actual content that will be printed using javascript in the onload frame. The page being printed has some rather large (specifically wide) tables on it, which causes the content not to fit on the A4 its printed on. It looks as if IE does not rescale the content of the frame to fit the A4 printer output when using a frameset or something. The weird part I can't figure out is that if I remove the frameset in a test it works and the content of the content-to-print.html page fits on the A4 paper. I changed it to something like this:

      printing
      

      Printing content

      </body>
      </html>
      </pre>

      I've tried playing with the DOCTYPE from loose to strict as well as removing it all together. The loose and strict did have some positive effect but didn't remove the problem completely.

      Now I know that using framesets is old school, but in this case its not that easy to remove them all. That would take to much time and affect to many parts of the web application. So how can I tell IE to print the exact same way when using a frameset as it does with the iframe solution. Is this at all possible.</x-turndown>

      C Offline
      C Offline
      cjoki
      wrote on last edited by
      #2

      Its been a while since I did anything with framesets, but are you using the doctypes FOR framesets?? cause I remember that display issues can occur without them. Also do you have any style rules that can be at fault?

      Chris J www.redash.org

      G 1 Reply Last reply
      0
      • C cjoki

        Its been a while since I did anything with framesets, but are you using the doctypes FOR framesets?? cause I remember that display issues can occur without them. Also do you have any style rules that can be at fault?

        Chris J www.redash.org

        G Offline
        G Offline
        Gerben Jongerius
        wrote on last edited by
        #3

        I've tried setting all the pages that are loaded in the frameset as well as the page containing the frameset to the doctype //W3C//DTD HTML 4.01 Frameset//EN. Something I've also tried is setting all pages to that doctype except for the one being printed and setting that to doctype loose. Non of this helped in the scaling issue unfortunately. With regards to the CSS styles, I've checked all styles but can't find any that are applied to the frameset itself or any of the other pages that the frameset loads that would stretch the frameset other then the page being printed.

        C 1 Reply Last reply
        0
        • G Gerben Jongerius

          I've tried setting all the pages that are loaded in the frameset as well as the page containing the frameset to the doctype //W3C//DTD HTML 4.01 Frameset//EN. Something I've also tried is setting all pages to that doctype except for the one being printed and setting that to doctype loose. Non of this helped in the scaling issue unfortunately. With regards to the CSS styles, I've checked all styles but can't find any that are applied to the frameset itself or any of the other pages that the frameset loads that would stretch the frameset other then the page being printed.

          C Offline
          C Offline
          cjoki
          wrote on last edited by
          #4

          not too sure but have you tried adding a css style tage with media print and foc the table to a certain size? Also a css reset may help remove browser specific layout issues, but you will need to add css after that to make a consistant appearance. When I must debug weird display issues I sometime use background colors on certain elements to get an idea on how the page is being affect. I make an inline style rule like style='background-color:red;' and move it from one block level element at a time. Sometimes you will need to different colors on seperate elements to find the cause. In one case I had a margin rule that was tossing the width of a parent element out of wack....and I think the style for the child was dynamic too... Anyways, hope that helps!

          Chris J www.redash.org

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups