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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing exact "groups" of info in a page.

Status
Not open for further replies.

KevinMcKloud

Programmer
Jun 8, 2002
22
MX
Hi, i have this text file:
------ BEGIN OF FILE -------

============================
hello one two three for five
1111 = 222 + 333 + 444 + xxx
============================
aaaaaaaaaaaaaa aaaaaaaaaaaaa
bb bbbbbbbbbbbbbbb bbbbbbbbb
cccccccccccc ccccccc ccccccc
dddddddddd dddddddddd dddddd
============================
eeeeeeeeeeee eeeeeeeeeeeeeee
============================
fffffffffffffffffffff ffffff
ggggg ggg ggg ggggg gggggggg
============================

--------- END OF FILE ------

So, every "======" line is the end of a group of
information, and i want to print groups in a
'letter' size page (i think is like 26 lines or
something like that) . But i do not want that
a group gets print only the Half of it like:

============== <-- on page 1
aaaaaaaa aaaaa <-- on page 1
------------------- <-- end of a printed page
bbbb bbbb bbbb <-- on page 2
cccccccc ccccc <-- on page 2
ddd dddddddddd <-- on page 2
============== <-- on page 2

I want that IF the Whole Group will not fit
at the end of a page, Then Start to print that
group in the next page, but not one part of it
in a page and the rest in the beginning of the
next page...
So, I want This:

---------------- <-- end of page 1
============== <-- on page 2
aaaaaaaa aaaaa <-- on page 2
bbbb bbbb bbbb <-- on page 2
cccccccc ccccc <-- on page 2
ddd dddddddddd <-- on page 2
============== <-- on page 2

So, i imagine i have to read the &quot;====== &quot;lines
and make a &quot;If ... then ... &quot; stuff to do that,
but dunno how =( i'd appreciate your help, pls.

Thanks

Kevin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top