Results 1 to 9 of 9

Thread: Scaling Page When Printing in IE

  1. #1
    Join Date
    Jan 2006
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Scaling Page When Printing in IE

    I know this is an old issue, but I've tried every suggestion I could find and nothing works in IE.

    I have a form that I need to print on one page. Here's my current CSS:

    Code:
    @media all {
    	.page-break	{ display: none; }
    }
    
    @media print {
    	div#formcontainer {display: block;}
    	form {width: 100%; font-size-adjust: .4;}
    	textarea {width: 98%;}
        body {background-color: #ffffff; zoom:67%;}
        a {color: #000000;}
    	.page-break	{ display: block; page-break-before: always; }
    	.address {width: 92%}
    }
    This works in every browser I've tried, except IE (currently running IE 11, but need it to work in earlier versions).

    Before you say it, I know Zoom is obsolete, but it makes the form print correctly in the other browsers.

    In IE, without the Zoom, it does no scaling (cuts the form off on the right). With the Zoom, it shrinks the form, but I loose the centering of the text and it does a page break where it would normally put it if I didn't use the Zoom. Is that clear???

    Anyway, if there's either a way to make it print correctly in IE, or if there's another approach that will work cross-browsers instead of using Zoom, I'd really appreciate knowing it.

    Thanks in advance.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm not the best at this. But I can see there's too little information. Without the layout of the page your're trying to print, how could anyone be certain of what to say? Better still, post a link to the page so we can see exactly what's going on.

    If you just want to try stuff, instead of zoom (or maybe even with it, but I would tend to think instead of), in the print style sheet try setting widths, heights, and font sizes, etc. in inches or fractions of inches ('in' values), those should correspond directly to the size of things on a printed page (standard printing page is 8.5in by 11in). Make it fit in that space, allow for margins, typically I think, 0.5in all around, but they might be a little more. If that's not working, allow for 1in margins.

    Also, one thing to be very careful of when testing in any browser is to make sure the browser isn't already set to print in a certain way. Many already are 'zoom to fit', that or other settings could interfere with what you're trying.

    And since, in the end you cannot control what settings the user has, question whether or not it really is a disaster if the form isn't printed as you envision.
    Last edited by jscheuer1; 04-19-2016 at 10:20 PM.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jan 2006
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Hi John.

    I'm sorry, but I can't post the page. It's a government form and it's confidential. However, I have tried the style sheet with other pages that would normally print larger than 8.5x11 (to see if the problem was with this particular form or with IE) and had the same results. If you use the style sheet with any large page, you should see the same results. I think I forgot to mention that I'm printing with widow.print().

    I did check the print settings for my IE, and they are the same as for the other browsers, so I don't think that is the problem. As I said, without the Zoom, it does no scaling at all.

    As to your question, if I can't get it to work, it will be a disaster ... for me.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    For more help, please answer the following three questions:

    1.) Have you tried the inches thing? If so what happened?

    2.) Can you post HTML code for a similar layout, yet a generic enough as far as info goes form that it won't violate any confidence? If so, please do so, or a link to same.

    We're not asking you to disclose any privileged information (I know a lot about NDA's), we just need to see the typical layout of something that, if we could print it the way that you want, you could print your form the way that you want. Think generic.

    3.) How will the world come to an end if IE users have to print out two pages for this form?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Jan 2006
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Hi John.

    To answer your questions in order:

    1) Yes, I have. No affect.

    2)Yes. I have modified a page I did for a different (non-governmental) client to match the basic layout of the form in question. The link is: http://ohiobuttons.org/test/FormTest.html

    Some things to note: The layout is 6 rows of 10 graphics. In IE, the 10th graphic in each row is cut off and a page break is inserted (by IE) where it would go if the Zoom function were not active. While by adjusting the Zoom value I can get IE to display all 10 graphics, it would still have the page-break problem. In addition, the form would be unnecessarily smaller on the page just to accommodate IE.

    3) That's easy. I'd loose the contract. I had to jump through a bunch of hoops to get this contract, and loosing it would not only be disastrous financially, but would greatly jeopardize my ability to get future contracts.

    BTW, I know that the "test" page puts out a blank page at the end. The actual form page doesn't do that.

    Jim

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    OK, well - since you say you already tried my best idea (using 'in' units in the print stylesheet to define font sizes and dimensions as needed for optimal printing) and seem to indicate that after exhaustive testing along those lines, nothing of that sort worked. I'm out of ideas for the moment. Feel free to open a new thread on this topic, as I'm sure many will ignore this one due to all of the activity in it up to this point (people tend to ignore threads they think are being worked on).

    Though if you choose to do that (open a new thread), it might get automatically or manually moderated as a dupe. Don't worry, as soon as I see it I will approve it, might take a day or two, probably less as long as you also supply in the new thread all of the information I previously elicited from you in this thread, as it will be instrumental for anyone willing to assist you in the new thread (should you choose to start one). To enforce that, if I see a new thread on this topic without all of that information (example page, what has been tried, how it has failed, and why this is crucial), I may delete it as a dupe. To make it simple for you, you can just explain the situation as best you can and then link back to this thread for folks wanting more info.

    If you choose that avenue, you don't have to be perfect in that. I just have to see that you are making a real effort to help whoever might next be willing to help you on this to fully understand the situation. I'm just asking that if you do choose to start a new thread on this (which I think is a good idea), you give the next person(s) as much information as possible so that they may have the greatest opportunity to assist you.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Jan 2006
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Hi John.

    I'm going to take you up on you suggestion. I think I'm going to change the problem statement, though. I think, if someone could solve the page break problem, I can at least meet the minimum requirements of the contract. Although, if you can't solve it I seriously doubt anyone can. No flattery, just fact.

    Thanks for everything,
    Jim

  8. #8
    Join Date
    Nov 2014
    Location
    On A Scottish Island
    Posts
    488
    Thanks
    0
    Thanked 62 Times in 58 Posts

    Default

    Are you printing a blank form or is it one which has been completed? If it's the former then just supply a blank form as a pdf file from the server. If it's the latter then POST the data back to a PHP file on the server and create the appropriate completed form there.

  9. #9
    Join Date
    Jan 2006
    Posts
    170
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    styxlawyer: Thanks for the suggestion. Unfortunately, it doesn't meet the requirements of the contract. This thread should be closed. Please see "Extraneous Page Break Inserted When Printing a Form with IE". Thanks, Jim

Similar Threads

  1. Printing a section of Web page Only
    By matrixbegins in forum JavaScript
    Replies: 1
    Last Post: 10-06-2008, 12:26 PM
  2. Printing from web page.
    By contracer11 in forum HTML
    Replies: 2
    Last Post: 02-23-2008, 06:23 PM
  3. Printing a section of a page
    By Scrounger in forum Looking for such a script or service
    Replies: 5
    Last Post: 01-16-2008, 07:53 AM
  4. tabcontent page printing - CSS anyone?
    By langer in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 10-17-2007, 11:04 AM
  5. web page printing problem
    By mdbiker in forum CSS
    Replies: 2
    Last Post: 10-06-2006, 02:16 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •