From roberthpike at yahoo.com Thu Oct 11 07:56:46 2012 From: roberthpike at yahoo.com (Robert Pike) Date: Thu, 11 Oct 2012 07:56:46 -0700 (PDT) Subject: [kw-pm] Print paging Message-ID: <1349967406.41984.YahooMailNeo@web122902.mail.ne1.yahoo.com> Not sure if anyone has had the need to do the following but I thought I'd throw it out there. I have data displaying on a webpage (dynamically generated) in a HTML table - 1 column for text, 1 for images (if there are any), and 1 for more text. I want to have it so that a row does not span 2 pages when printed (very much like what page-break-inside: avoid seems to accomplish). In some cases the first column's text can a few "lines" long or it could be 20 lines long, causing the row to expand vertically and therefore span 2 pages. Since the text (length, fonts, etc..,) and images (present or not, number of) vary it makes it hard to maximize the number of questions per page while staying within the constraints. If you know of a decent approach to take to get the desired paging results I'd like to hear them. Cheers. -------------- next part -------------- An HTML attachment was scrubbed... URL: From foxryan at gmail.com Thu Oct 11 08:14:01 2012 From: foxryan at gmail.com (Ryan Fox) Date: Thu, 11 Oct 2012 11:14:01 -0400 Subject: [kw-pm] Print paging In-Reply-To: <1349967406.41984.YahooMailNeo@web122902.mail.ne1.yahoo.com> References: <1349967406.41984.YahooMailNeo@web122902.mail.ne1.yahoo.com> Message-ID: Hi Rob, HTML isn't meant for guaranteeing anything about how it looks when it's printed. Try a PDF. ;) On Thu, Oct 11, 2012 at 10:56 AM, Robert Pike wrote: > Not sure if anyone has had the need to do the following but I thought I'd > throw it out there. I have data displaying on a webpage (dynamically > generated) in a HTML table - 1 column for text, 1 for images (if there are > any), and 1 for more text. I want to have it so that a row does not span 2 > pages when printed (very much like what page-break-inside: avoid seems to > accomplish). In some cases the first column's text can a few "lines" long > or it could be 20 lines long, causing the row to expand vertically and > therefore span 2 pages. Since the text (length, fonts, etc..,) and images > (present or not, number of) vary it makes it hard to maximize the number of > questions per page while staying within the constraints. If you know of a > decent approach to take to get the desired paging results I'd like to hear > them. Cheers. > > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From max at alleged.net Thu Oct 11 08:14:53 2012 From: max at alleged.net (Max) Date: Thu, 11 Oct 2012 11:14:53 -0400 Subject: [kw-pm] Print paging In-Reply-To: <1349967406.41984.YahooMailNeo@web122902.mail.ne1.yahoo.com> References: <1349967406.41984.YahooMailNeo@web122902.mail.ne1.yahoo.com> Message-ID: <5076E26D.8080109@alleged.net> Since this isn't particularly perl related, I think a better venue might be somewhere like stackoverflow. Cheers, Max On 10/11/12 10:56 AM, Robert Pike wrote: > Not sure if anyone has had the need to do the following but I thought > I'd throw it out there. I have data displaying on a webpage > (dynamically generated) in a HTML table - 1 column for text, 1 for > images (if there are any), and 1 for more text. I want to have it so > that a row does not span 2 pages when printed (very much like what > page-break-inside: avoid seems to accomplish). In some cases the first > column's text can a few "lines" long or it could be 20 lines long, > causing the row to expand vertically and therefore span 2 pages. Since > the text (length, fonts, etc..,) and images (present or not, number > of) vary it makes it hard to maximize the number of questions per page > while staying within the constraints. If you know of a decent approach > to take to get the desired paging results I'd like to hear them. Cheers. > > > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From singpolyma at singpolyma.net Thu Oct 11 08:23:35 2012 From: singpolyma at singpolyma.net (Stephen Paul Weber) Date: Thu, 11 Oct 2012 10:23:35 -0500 Subject: [kw-pm] Print paging In-Reply-To: References: <1349967406.41984.YahooMailNeo@web122902.mail.ne1.yahoo.com> Message-ID: <20121011152335.GB1963@singpolyma-svelti> Somebody claiming to be Ryan Fox wrote: >HTML isn't meant for guaranteeing anything about how it looks when it's >printed. Try a PDF. ;) CSS has some features designed for controlling print, but in general pixel-perfect display is a weird concept from back when printing was a good idea. Full disclosure: I do not think printers are a good idea ;) -- Stephen Paul Weber, @singpolyma See for how I prefer to be contacted edition right joseph -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: From nick.dumas at gmail.com Thu Oct 11 12:54:59 2012 From: nick.dumas at gmail.com (Nick Dumas) Date: Thu, 11 Oct 2012 15:54:59 -0400 Subject: [kw-pm] kw-pm Digest, Vol 111, Issue 1 In-Reply-To: References: Message-ID: One of the first problems is defining "a page" Netbooks have 600 px minus a bunch for window decorations. People with monitors rotated to portrait orientation get upwards of 1900px Width is even worse, since it won't generally be the size of the monitor minus a bit, just a random click-drag resize to people's whims. On top of that, fonts and even graphics can be scaled up and down based on the zoom settings of the user's browser too. If at all possible, relaxed and dynamic is the way to go on the web. When perldoc.perl.org/ changed to a fixed width layout, I had to go and monkeypatch it back to dynamic width with some CSS overrides. Now it looks uglier than it did before the change, but it is once again useful to me since I can read it on both my netbook (narrow) and desktop (wide), side-by-side with code I'm working on (even narrower!) or on a second monitor (extra wide) - Nick > > Not sure if anyone has had the need to do the following but I thought I'd throw it out there. I have data displaying on a webpage (dynamically generated) in a HTML table - 1 column for text, 1 for images (if there are any), and 1 for more text. I want to have it so that a row does not span 2 pages when printed (very much like what page-break-inside: avoid seems to accomplish). In some cases the first column's text can a few "lines" long or it could be 20 lines long, causing the row to expand vertically and therefore span 2 pages. Since the text (length, fonts, etc..,) and images (present or not, number of) vary it makes it hard to maximize the number of questions per page while staying within the constraints. If you know of a decent approach to take to get the desired paging results I'd like to hear them. Cheers. From daniel at coder.com Tue Oct 16 08:42:38 2012 From: daniel at coder.com (Daniel Allen) Date: Tue, 16 Oct 2012 11:42:38 -0400 Subject: [kw-pm] No October talk. Join us in November for joint CS Club talk Message-ID: No October talk. The next scheduled kw.pm talk is going to be November 15th, where we're having a special presentation to the CS club on perlish goodness by our very own dnm. So c'mon out and heckle^w show your support. (who am I kidding, we'll probably heckle too). Location TBD, but probably in the Math and Computing (MC) building at the University of Waterloo. -------------- next part -------------- An HTML attachment was scrubbed... URL: