User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 402,473 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,945 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting

Design for A4 printing HTML report - Pg Break?

Join Date: Jun 2005
Location: Kansas City, Missouri, USA
Posts: 344
Reputation: Troy is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 4
Troy's Avatar
Troy Troy is offline Offline
Posting Whiz

Re: Design for A4 printing HTML report - Pg Break?

  #2  
Mar 7th, 2006
This is an "issue" I've visited many times. Unfortunately, formatting HTML to be viewed in a web page that will print exactly the way you want is near impossible---you aren't allowed that kind of control over the formatting with HTML.

With CSS, you can insert page breaks.
http://www.w3.org/TR/REC-CSS2/page.html

The other problem people have is how to know when to insert the page-breaks. For example, if I have 500 rows of data to print in a report, and I want a header and footer on all pages, and I want each page to nicely fit an 8.5 x 11 page, how many records can I print on each page? Good question! All you can do is set the font-size and line-height, etc using CSS, then make your best guess (trial and error) as to how many lines fit per page. If you have to deal with lines possibly wrapping---ouch--your job is that much more difficult.

If you REALLY need the report to look professional, and exact formatting is required, then this is what PDF's are designed for. You can programattically generate PDF's on the fly and serve to your customers on your website. Moderator Tgreer (www.tgreer.com) on this forum is one of the leading Postscript / PDF experts in the country and can provide further assistance. Maybe he will chime in on this thread.
Troy Wolf is the author of SnippetEdit. "Website editing as easy as it gets." IX Web Hosting
Reply With Quote  
All times are GMT -4. The time now is 4:26 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC