Tip

Page Break printing HTML documents

This is how to include page brakes into HTML documents. Here is a function where u can pass all the text or html you want to show. The main bit to include the page break is : "<h3 style='page-break-before:always'>" & "</h3>" that will make the printer jump to the next page.


FullBody =  FullBody  & "<h3 style='page-break-before:always'>"  
& "</h3>"+ plainText Call msgScreen (FullBody) Sub msgScreen(msg$, NP) Print "Content-Type:text/plain" Print "Content-Type:text/html" Print |<HTML><HEAD>| Print |</HEAD>| Print |<STYLE TYPE="text/css"> MEDIA ="Screen" </STYLE>| Print |<BODY>| Print |<DIV ID=Message>| Print |<FONT SIZE=1><RIGHT><TT><NOBR>| & msg$ & |</NOBR></TT><RIGHT></FONT>| Print |</DIV>| Print |<INPUT TYPE="Hidden" NAME="NPages" VALUE="| & NP & |">| Print |</BODY></HTML>| End Sub

This was first published in April 2001

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.