on Jun 24th, 2015, 10:50am, Richard Russell wrote:| I think I have a program which does that |
|
Here is the program. It's intended as a proof-of-principle, in practice you would probably want to put the printing code in a SUB so it can be called from multiple places:
Code: PrinterName$ = "DoPDF v7"
pv = 99999
page = 1
for i = 1 to 200
oldpv = pv
!pv = @vdu%!-8
if pv < oldpv then
lprint "THIS IS THE HEADER FOR PAGE "; page
lprint
page = page + 1
end if
lprint "This is line "; i; " of text sent to the printer"
next
dump
Note that this can't work if you are relying on the 'word wrap' capability of LPRINT (unless you output each word individually), because if it wraps from one page to the next it's impossible to print the header part way through the output string.
Richard.