text2pdf convert text file(s) to pdf.
doc generated from the script with gendoc
bash script, version=1.05


text2pdf [options] [file ...]


print short help and exit
print full documentation via less and exit
print version and exit
print X columns on the page, default: 1
set TTF/OTF font to X; default: Latin Modern Mono
print landscape; default: portrait
set margins to X mm; default: 10
number the lines; default: no numbering
write PDF to X[.pdf]; default: write to standard output
start each file on a new page.
set fontsize to X points; default: 10
squeeze multiple newlines in input to one
have tabs X characters apart; default: 8
print counter + file name before the output of each file
set white between lines to X points; default: 2


text2pdf converts one or more text files to pdf. You can print the text in up to 9 columns (default: 1), in any font size (default: 10). The font used by default is Latin Modern Mono. You can start each file on a new page and introduce each file with a numbered header containing its name; and you can number the lines.


prints short help information.
Prints full documentation via less.
the text of each file will be preceeded with a header line containing a counter followed by the file name.
the text of each file will start on a new page.
the output will be printed in X columns, where n=1-9, default: 1. This is useful, for example, for printing a file listing.
set the point size to X, default: 10.
set white between lines to X, default: 2.
changes the font to X, which must be the PostScript name of an available TTF or OTF font. The default (probably in your distro) is Latin Modern Mono. Be sure the choose a font that contains all characters occurring in your file. You probably also want the font to be monospaced.

set the margins to X mm; default: 10mm

lines will be numbered.
tabs will be expanded to X spaces. The default is 8.
multiple empty lines will be squeezed to a single empty line.


Wybo Dekker


Released under the GNU General Public License

Functions used:


inttest opt int
check if int is a positive integer and print it; if not,
give a fatal message.


excheck executable1 [executable2...]
check if all needed execs are there and getopt is GNU


handle_options "$@"
handle the options.
globals used:
Myname Version
globals  set: