home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Supreme Volume 6 #1
/
swsii.zip
/
swsii
/
484
/
PGNAT101.ZIP
/
PAGINATE.DOC
< prev
next >
Wrap
Text File
|
1993-10-22
|
3KB
|
67 lines
PAGINATE
Free DOS utility: text file paginator
Version 1.01 - October 22, 1993
(c) 1993
by
David Daniel Anderson
Reign Ware
PAGINATE prepares text files for printing by placing formfeeds (ASCII 12),
also called page breaks, at user specified intervals.
Usage: PAGINATE /i<infile> /o<outfile> /l##[:##] (lines per odd/even page)
Example: PAGINATE /iNOTPAGED.TXT /oPAGED.TXT /l55
PAGINATE takes exactly three parameters on the command line. ALL ARE MANDATORY.
The order is not significant, but the switch character ("/") and the first
letter ("i" or "o" or "l") of each are. The above example should be most
helpful in understanding how to use this program.
Using the example above as a base, substitute the name of whatever file you
want to paginate for NOTPAGED.TXT, and a currently *non-existent* file name
for PAGED.TXT (since the program refuses to overwrite any existing file).
PAGED.TXT will be identical to NOTPAGED.TXT except that a formfeed will be
inserted at the interval specified after the "/l" parameter. If "/l60" is
specified, every page will have 60 lines (until the last, which will have
the remainder). If "/l0" is specified, a formfeed will be inserted at the
beginning of the first line (literally, after "0" lines), and the rest of
the file will be unaltered. (Wildcards are not allowed.)
You can specify a different number of lines for odd and even pages by appending
to the lines per page (/l##) parameter a colon (:) followed by another number.
For instance, to get 50 lines on odd pages and 55 on even pages, simply specify
"/l50:55" (without the quotes.)
A formfeed or pagebreak is accomplished by inserting the ASCII char. 12 into
the document, which is represented by the intl. symbol for the female gender.
The files need not be in the current directory. The maximum value of
lines per page is 65535 (hardly a very useful page length anyway).
Finally, in case you are wondering I have chosen to have the formfeed placed
at the beginning of a line instead of at the end, or even inserting an entire
new line, it is based on how a printer interprets text. At the end of every
text line is a linefeed and carriage return (EOL), which prints as an *extra*
blank line if there is also a formfeed at the "end" of the line or on a "blank"
line. In order for the formfeed to act simply as a formfeed, and not add a
line as well, it MUST precede the first character of the first line of text.
{------------------------------------------------------------------------------
REVISION HISTORY
v1.00 : 1993/07/14. First public release. DDA
v1.01 : 1993/10/22. Now removes existing page breaks automatically. DDA
------------------------------------------------------------------------------}