Browsers not breaking pages on print

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • xprotocol

    Browsers not breaking pages on print

    Trying to print a web page that scrolls to right a bit. I would think
    IE would page break by default when it gets to the end of the sheet,
    but it doesn't, it just cuts off the print. This only needs to work
    in IE but FF does the same thing. I tried messing with some
    media="print" functionality on it but couldn't get any page breaks to
    happen. I'm guessing there's something in the markup of the page that
    the browsers don't like, any idea what I should look for? Thanks.
  • Andreas Prilop

    #2
    Re: Browsers not breaking pages on print

    On Wed, 21 Nov 2007, xprotocol wrote:
    Trying to print a web page that scrolls to right a bit.
    Your own page? Which address (URL)?

    --
    Top-posting.
    What's the most irritating thing on Usenet?

    Comment

    • Harlan Messinger

      #3
      Re: Browsers not breaking pages on print

      xprotocol wrote:
      Trying to print a web page that scrolls to right a bit. I would think
      IE would page break by default when it gets to the end of the sheet,
      but it doesn't, it just cuts off the print. This only needs to work
      in IE but FF does the same thing. I tried messing with some
      media="print" functionality on it but couldn't get any page breaks to
      happen. I'm guessing there's something in the markup of the page that
      the browsers don't like, any idea what I should look for? Thanks.
      You mean you expect the browser to do what Excel does with a wide
      spreadsheet, treating the presentation as though it's multiple pages
      across as well as down? It won't. It's up to you to structure your page
      so that its layout adjusts to fit the width of whatever medium is being
      used to display it.

      Comment

      • Chris F.A. Johnson

        #4
        Re: Browsers not breaking pages on print

        On 2007-11-21, Harlan Messinger wrote:
        xprotocol wrote:
        >Trying to print a web page that scrolls to right a bit. I would think
        >IE would page break by default when it gets to the end of the sheet,
        >but it doesn't, it just cuts off the print. This only needs to work
        >in IE but FF does the same thing. I tried messing with some
        >media="print " functionality on it but couldn't get any page breaks to
        >happen. I'm guessing there's something in the markup of the page that
        >the browsers don't like, any idea what I should look for? Thanks.
        >
        You mean you expect the browser to do what Excel does with a wide
        spreadsheet, treating the presentation as though it's multiple pages
        across as well as down? It won't. It's up to you to structure your page
        so that its layout adjusts to fit the width of whatever medium is being
        used to display it.
        I think you have that backwards. :)

        "It's up to you to not to structure your page so that its layout
        doesn't adjust to fit the width of whatever medium is being used
        to display it."

        By default, a page will adjust; if it doesn't, its because you have
        done something to prevent it.

        --
        Chris F.A. Johnson <http://cfaj.freeshell. org>
        =============== =============== =============== =============== =======
        Author:
        Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

        Comment

        • Chris Morris

          #5
          Re: Browsers not breaking pages on print

          "Chris F.A. Johnson" <cfajohnson@gma il.comwrites:
          On 2007-11-21, Harlan Messinger wrote:
          You mean you expect the browser to do what Excel does with a wide
          spreadsheet, treating the presentation as though it's multiple pages
          across as well as down? It won't. It's up to you to structure your page
          so that its layout adjusts to fit the width of whatever medium is being
          used to display it.
          >
          By default, a page will adjust; if it doesn't, its because you have
          done something to prevent it.
          For example, adding content with an unavoidably large intrinsic
          width. Data tables can reasonably have several columns each containing
          long(ish) words or numbers that constrain their minimum width. Only
          being able to print off the left half (quarter, tenth) of a complex
          data table *is* a browser bug. In most other display media, in this
          situation, you'll get a scroll-bar and be able to read the table. Not
          the most user-friendly interface, but you can at least get at the
          data. In print, where a scroll-bar is impossible, why *shouldn't* the
          browser print (at least as an option!) multiple pages horizontally?

          --
          Chris

          Comment

          • Harlan Messinger

            #6
            Re: Browsers not breaking pages on print

            Chris Morris wrote:
            "Chris F.A. Johnson" <cfajohnson@gma il.comwrites:
            >On 2007-11-21, Harlan Messinger wrote:
            >>You mean you expect the browser to do what Excel does with a wide
            >>spreadsheet , treating the presentation as though it's multiple pages
            >>across as well as down? It won't. It's up to you to structure your page
            >>so that its layout adjusts to fit the width of whatever medium is being
            >>used to display it.
            > By default, a page will adjust; if it doesn't, its because you have
            > done something to prevent it.
            >
            For example, adding content with an unavoidably large intrinsic
            width. Data tables can reasonably have several columns each containing
            long(ish) words or numbers that constrain their minimum width. Only
            being able to print off the left half (quarter, tenth) of a complex
            data table *is* a browser bug.
            No it isn't. It may be the lack of a *useful feature*, but that's a
            topic for a different discussion, and I would dispute it. If you've got
            a web page consisting of text that insists on being wide enough to
            overflow the right margin of a piece of paper, then should it split the
            content along a straight vertical line, slicing right through characters
            and images as it goes? If the web page is 500 lines long, equivalent to
            maybe 20 sheets of paper when there *isn't* a horizontal overflow, and
            only one paragraph, or perhaps a short table or an image, overflows the
            right margin, then when you print the page should the printer, in
            addition to 20 sheets containing the left side of the content, spit out
            19 blank pages as well as the 20th that has the right side of the
            overflowing material on it? Or 38 blank pages as well as the 39th and
            40th if the overflow is itself more than one page wide?

            In most other display media, in this
            situation, you'll get a scroll-bar and be able to read the table. Not
            the most user-friendly interface, but you can at least get at the
            data. In print, where a scroll-bar is impossible, why *shouldn't* the
            browser print (at least as an option!) multiple pages horizontally?
            >

            Comment

            • Jonathan N. Little

              #7
              Re: Browsers not breaking pages on print

              xprotocol wrote:
              Sorry, its hard to be specific as the HTML source is rather complex
              and probably wouln't make things much easier to understand if I posted
              it.
              For heaven sake no! Don't post code, post a URL to the code!
              The easiest explanation I can say is that somewhere in the source
              I have two large SPAN's. For one of them I said "page-break-
              after:always;" but nothing happened.
              SPANs? SPANs are *inline* elements page-break-before & page-break-after
              properties that apply to *block* elements so I am not surprised that it
              does not work.
              I guess what I'm looking for is
              maybe an explanation or a site that says what the rules are for using
              these printing features. Everything Google came up with was very
              basic (i.e. put this in and you magically get a page break, obviously
              not the case).

              --
              Take care,

              Jonathan
              -------------------
              LITTLE WORKS STUDIO

              Comment

              • rf

                #8
                Re: Browsers not breaking pages on print


                "xprotocol" <xprotocol@gmai l.comwrote in message
                news:8ceeda70-9b65-489f-8e99-83950f9365ef@r3 1g2000hsg.googl egroups.com...
                Sorry, its hard to be specific as the HTML source is rather complex
                and probably wouln't make things much easier to understand if I posted
                it. The easiest explanation I can say is that somewhere in the source
                I have two large SPAN's. For one of them I said "page-break-
                after:always;" but nothing happened.
                According to the spec over at http://www.w3.org/TR/CSS21/propidx.html
                page-break-after (and all the other page-break things) only apply to block
                level elements. Span is an inline element.
                I guess what I'm looking for is
                maybe an explanation or a site that says what the rules are for using
                these printing features. Everything Google came up with was very
                basic (i.e. put this in and you magically get a page break, obviously
                not the case).
                See above.

                --
                Richard


                Comment

                • CJ

                  #9
                  Re: Browsers not breaking pages on print

                  I have a similar problem with a page of mine. I have a div that
                  contains two spans that each contains a table. The table in the left
                  side div is just a description of activity for a person, while the
                  table in the right side span has 24 columns, and has small graphics
                  showing the length of time spent on that activity for a day. The
                  problem is that the activity description can be pretty long (300 px),
                  and the graphics for the day add up to make the length of the right
                  side span pretty long too (~500 px). IE creates a scroll bar at the
                  bottom of the page, but if I go into print preview, I only see the
                  description, and maybe 3 hours on a single page. The rest of the
                  hours just disappear and I can't see them at all.
                  I have tried adding
                  <style type="text/css">
                  SPAN {display:block; }
                  </style>
                  <style type="text/css" media="print">
                  DIV {position:relat ive;}
                  SPAN {position:relat ive;}
                  </style>
                  to display SPANs as blocks since one google search implied that could
                  have been an issue, while another search implied position:absolu te
                  could have also caused an issue.

                  I don't have this on the open internet because this is for my dad to
                  use, so I'm leaving it purely intranet

                  Comment

                  • Beauregard T. Shagnasty

                    #10
                    Re: Browsers not breaking pages on print

                    CJ wrote:
                    I have a div that contains two spans that each contains a table.
                    You can't put <tableinside a <span>. Maybe your problem will go away
                    if you have valid markup.

                    See: http://validator.w3.org/

                    --
                    -bts
                    -Motorcycles defy gravity; cars just suck

                    Comment

                    Working...