More information about the Underscore mailing list

[_] Pagebreaks in printed webpage

Martin Moore martinm at it-helps.co.uk
Fri Feb 8 17:29:27 GMT 2013

I finally got it working - the CSS never did work, but used something very
similar to get it working when printing the page :

.pb 
    { page-break-after : always } ;
    } 


Not sure what the second } does but it appears to be needed !?


What I was missing was adding the html header/footer and CSS to the string
sent to the print window when printing only parts of the page.

Works fine now.

Cheers,

Martin.

-----Original Message-----
From: underscore-bounces at under-score.org.uk
[mailto:underscore-bounces at under-score.org.uk] On Behalf Of Owen
Curtis-Quick
Sent: 08 February 2013 17:21
To: underscore at under-score.org.uk
Subject: Re: [_] Pagebreaks in printed webpage

On 7 Feb 2013, at 14:53, Martin Moore wrote:

> Today's ]_] hair-puller....
> 
> I need to be able to print some content from a page with page breaks 
> at certain points.
> 
> Seems simple enough, but can I get it to work ?!*&! No...
> 
> Needs to work on IE8+, Firefox. Safari would be nice.
> 
> My test code is at  http://pastebin.com/Yd4g29Xk
> 
> What do I need to do?


Code is good, that's what I've used before. It works in Chrome, Safari,
Firefox on Mac. I didn't your demo in IE though.

I found that 'page-break-after' is more unreliable than 'page-break-before'
but that's what you're using already.
--
underscore_ list info/archive ->
http://www.under-score.org.uk/mailman/listinfo/underscore
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.2897 / Virus Database: 2639/6085 - Release Date: 02/06/13