home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 2: PC
/
frozenfish_august_1995.bin
/
bbs
/
d01xx
/
d0137.lha
/
VLabel
/
VLabel.doc
< prev
next >
Wrap
Text File
|
1988-03-20
|
7KB
|
156 lines
VLabel 1.20
A program to make fancy little disk labels.
Copyright (C) 1987
by Stephen Vermeulen
3635 Utah Dr. N.W.,
Calgary, Alberta,
CANADA, T2N 4A6
(403) 282-7990
=============================================
This program may be freely redistributed
provided that no charge is made for such
distribution appart from reasonable media
costs. This program may not be distributed
with any commercial product without the
prior written approval of the Author.
=============================================
Introduction:
AMUC (the AMiga Users of Calgary) saw the need for fancy little
disk labels for its monthly newsletter disk and I opened my big
mouth at the wrong time. The result is this little piece of
software. In short this program will print labels (or envelopes...)
which are composed of an IFF graphic and any number of lines
of text (from 0 to 50). The text is merged into the graphic and
may be written in any font in the system, each line of text is
independently positioned any where on the page. VLabel gets the
input for the text either from a file (SuperBase ASCII compatible)
or the keyboard.
Necessary Files:
When run VLabel looks for two files in the current directory, these
are called "Label_data" and "Label_logo".
The Label_logo file is an IFF graphic (2 colour only) that should be
the full size of the area to be printed. For labels that are
1-7/16ths inch high by 2-3/4 inch wide printed on an Epson type
printer in 120 dpi horizontal by 72 dpi vertical mode the logo picture
should be 330 pixels wide by 104 pixels high. Such an image can
easily be made in a Paint program (like Express Paint) by editing on a
page that is a bit bigger than the final image and then saving only
the 330x104 pixel region by using the Save Boxed mode. The Label_logo
can be virtually any size you want (keep it below 1000 by 1000 because
of blitter problems) the only restriction is it should be a two
colour image.
The Label_data file is a plain ASCII file that describes how the
text should be rendered on to the label logo image. This file's
format is:
Ncom com1 com2 ... comN
n
x_1 y_1 fontname1.font font_size1
x_2 y_2 fontname2.font font_size2
x_3 y_3 fontname3.font font_size3
.
.
.
x_n y_n fontnameN.font font_sizeN
An example might be:
3 27 74 12
3
200 20 topaz.font 11
200 40 diamond.font 20
100 90 emerald.font 18
The first line is the amount to advance the page after each label.
This allows one to move over the blank gaps between labels. This line
is printer specific since (to the best of my knowledge Commodore did
not supply a a micro feed command to the printer drivers). The first
number on the line is the number of bytes in the command string to do
the page advance. In this case I am issuing the 3 byte sequence which
on an Epson type printer will advance the page 12/216ths of an inch.
You can specify any number of bytes in the command up to 20. If you
specify a value of 0 then no page advance command will be issued. The
next line is the number of text strings to be merged in to the logo if
you only want to print the logo image then put a 0 here and stop.
After this there are N lines starting with two numbers per line. These
are the (X,Y) coordinates for each of the text strings. Following
these X,Y coordinates are the name and point size of the font to be
used to render the text string. Any Amiga font in the FONTS:
directory may be used here. If a font (or point size) is not
available then the default system font (probably topaz 8) will be
used.
Running VLabel:
VLabel can be run with either of the following CLI commands:
VLabel
or
VLabel filename
When VLabel is run with out any filename it will read in the Label_logo
and Label_data files and then prompt you for the N text strings. Once
these strings have been entered it will printout one label advance the
page by the desired amount and then stop. This is useful for aligning
the labels on the printer. When in this mode you can have spaces in
the strings you enter, and you do not need to put quotes about them.
When VLabel is run with a filename it will read the Label_logo and
Label_data files. Then it will parse the given input file and
print the labels using the text contained in that file. Since AMUC
needed the program to work as painlessly as possible with
SuperBase output the file format that is expected is:
item1,item2,item3,...,itemN
item1,item2,item3,...,itemN
.
.
.
item1,item2,item3,...,itemN
Where each LINE is a separate label. On each line there must
be N items (text strings) where N is specified in the Label_data
file. The all items in each line may have embedded spaces
and do not need quotation marks. Note that NULL items are
not allowed, VLabel will go into an endless loop if this is
attempted...
Bugs:
When printing a bunch of labels from a file you may get one extra
garbage label at the end... And NULL items are not allowed (as noted
above).
Preferences Considerations:
To get normal looking labels (black text on white background) set
the image type to positive and black+white. To get reverse field
labels set image type to negative and black+white mode.
Printer Specifics:
Since the raster port dumping routine will always dump the output
in 8 pixel high chunks, if the image is not an exact multiple of
8 pixels high you will get a few blank lines. This may or may not
be desirable, but with the inter-label feed option you can always
make the labels a bit shorter and feed between them.
Comments and Suggestions:
These are always welcome and invited. If you want a modification
send me a letter describing it and if I get around to it I will send
the result off to Fred Fish.