Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing HTML

Status
Not open for further replies.

NeedVBHelp

Programmer
Mar 9, 2000
15
US
Does anyone know how to insert pagebreak and printer orientation on HTML?<br>I meant not using &quot;File - Print&quot; menu.<br>Thanks
 
HTML is a script language meant to be interpreted by a browser application only, there is no printer specifics I know of, but tags to help format, are like &lt;Br&gt;(break), &lt;P&gt;(Paragraph), or you can create a table, set it's width to percentage(so that it adjusts to any size) then throw stuff in there. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in , or have messed with : VC++, Borland C++ Builder, VJ++6(starting),VB-Dos, VB1 thru VB6, Delphi 3 pro, Borland C++ 3(DOS), Borland C++ 4.5, HTML,Visual InterDev 6, ASP(WebProgramming), QBasic(least i didnt start with COBOL)
 
Yes, there is a way to control Page-break, but not exactly in HTML. HTML is a markup language (not a scripting language)- it's meant to mark up text, not control printing. However, any word processor worth using (which, in a way, is a program that displays marked up text) has a page-break option. Well, Cascading Style Sheets is the tool that gives you this. (I know this isn't supported in 3.0 browsers, and I'm not sure if this is supported in Netscape 4; NN4 has traditionally lagged behind in CSS support; but it is definitely supported in IE5, as I used this tool to print out my school class schedule with page breaks in between terms.)<br><br>Here's how I did it... I created a CSS class (you need to know the basics of CSS before you can know what I'm talking about- for this, I'll refer you to my CSS tutorial at <A HREF=" TARGET="_new"> called TR.break, like this:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;TR.break {<br> page-break-before: always<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<br><br>then, every time I wanted a page-break, I'd make that next row (the first row of the next page) a member of the &quot;break&quot; class. Of course this can be done with any tag, even in a style attribute, like &lt;DIV STYLE=&quot;page-break-before: always&quot;&gt;this will show up on a new page when printed&lt;/DIV&gt;. There's &quot;page-break-after&quot; as well.<br><br>To see this in action, you can take a look at my class schedule for the year 2000/2001 at <A HREF=" TARGET="_new"> (and just view the source to get an idea for how I did it). If that doesn't print on different pages in between each term, your browser isn't capable of making use of this CSS aspect. Best of luck! <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top