Print HTML

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Print HTML

Post by magicrobotmonkey »

I am trying to figure out how best to format HTML for printing out. I have a listing that the client wants daily. What I currently just put it into a table. Every 28 lines I put in the label row again with a apage-break-before in it. This is ok, but it means it only comes out right if the user prints in a certain way (that is, landscape). I would rather a)figure out a more comprehensive and user friendly way to format HTML for printing or b) simply print so I don't have the user that can change page setup and such, or c) maybe i'll just produce an Excel or PDF, but I don't want to get that involved because its only a little report.


So, anyone know of a site that discussus formatting html for printing? I've been scouring the web, waiting for this place to come back up!
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

no? nothing??
phait
Forum Commoner
Posts: 46
Joined: Wed Apr 07, 2004 4:41 am
Location: watford / leicester, UK

Post by phait »

hi,
if you could style the output via css then you can use the media="print" attribute for declaring a stylesheet and then have formatting conditions in there. You can specify things such as page breaks, margins etc...

Suggest you look over this article as a start.
http://www.alistapart.com/articles/goingtoprint/

The guy who wrote it, eric meyer is an uber css guy and you'd do well to look over his site aswell which I think is mentioned in the article.

hth[/url]
magicrobotmonkey
Forum Regular
Posts: 888
Joined: Sun Mar 21, 2004 1:09 pm
Location: Cambridge, MA

Post by magicrobotmonkey »

coo', thanks I'll check it out
phait
Forum Commoner
Posts: 46
Joined: Wed Apr 07, 2004 4:41 am
Location: watford / leicester, UK

Post by phait »

nae problem
Post Reply