Page breaks in txt or html file

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Rory
Pro Scripter
Posts: 50
Joined: Thu Mar 23, 2006 2:50 pm
Location: Wisconsin

Page breaks in txt or html file

Post by Rory » Sun May 10, 2009 10:32 pm

I am writing to a text file and am curious if it is possible to create page breaks in a text file. I have also found that the WLN> command writes to a html format. Is is possible to inserts page breaks into the html as it gets created?

Rory

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon May 11, 2009 3:21 am

WriteLine just writes characters to an ANSI text file, no formatting is done. If you are seeing HTMLL format it may be because you are looking at the file that is already an HTML document, or you are looking at the file in a HTML editor.

If you are writing to an HTML file, then you can write where ever you want a line break. HTML files do not recognize the normal %LF% or %CR% characters.

There is no HTML code for page breaks. But you can use cascading style sheets, it is possible to give the web browsers a "hint" to help them put page breaks where you want them. Here is an example:



This will force a page break when printing, before the start of this particular element. But, not all web browsers support CSS perfectly. If you use PDF vs. HTML, then you will have more control over layout control and printing.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts