home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 19 Printer
/
19-Printer.zip
/
ps2fax.zip
/
READ.ME
< prev
Wrap
Text File
|
1993-07-07
|
9KB
|
184 lines
DISCLAIMER
I am not a programmer. In fact, I have not even had time to learn REXX
scripts. I am sure that there are better ways -- much better ways -- to do
what I have tried to do in this little package. It seems to work for me,
but I only did it late last night -- so who knows. I offer it free of
price and any warranty implied or explicit.
BACKGROUND
I have used a commercial DOS product to convert the postscript output of
various word processors and DTP programs to fax format. I send out more by
fax than be mail, and much of my work is done from hotel rooms while I am
travelling.
OS/2 2.1 has a bug that, on some machines, causes it not to release more
conventional memory in DOS windows with Video_Mode_Restriction set to CGA.
I need the extra memory to handle downloadable fonts under the DOS program
(it reminds one why we migrated to OS/2 in the first place -- such
considerations). This bug his my notebook -- the machine I most need for
fax conversion. And I am leaving on a long trip to London Saturday.
So I stayed up late last night playing with Ghostscript.
GHOSTSCRIPT
Although Ghostscript has been ported to OS/2, I never thought of it as an
alternative (until forced to yesterday) for several reasons. Its
documentation is chaotic and opaque (at least to this semiliterate computer
user). I believed that it only supported a motley collection of homemade
fonts of dubious quality and would not convert my commercial Adobe type 1
fonts. I did not believe that it supported graphics output of the sort I
needed.
Under pressure, however, I re-explored it and discovered that most of my
impressions were in error -- except those concerning the documentation.
The documentation mentions, rather casually, that Ghostscript supports all
fonts that would normally work with a postscript interpreter. It even
showed how to install these fonts in a FontMap file. By typing "-h" on the
command line, I also learned that it supported PCX output, in addition to
other graphics and printer formats.
THE EVOLUTION OF MY LITTLE PACKAGE
I decided that, for now, I did not care to use any of their fonts -- except
"UGLY", which is required as a default. So I deleted them from the
Ghostscript directory. They have the suffix: "gsf". Next I painstakingly
amended the FontMap file to refer to al l the commercial fonts installed on
my disk. There are about fifty.
I did this -- to avoid typing errors -- by taking the old FontMap as a
template and changing entries one by one. I looked at each font's "pfb"
file and copied the exact font name to clipboard (using Enhanced Editor).
I then substituted the name for one I had deleted and entered the file
name: "*.pfb*.
It did not seem to work properly. In the process of fiddling, I discovered
that there is no way to configure an OS/2 printer driver -- like
AppleLaserWriter Plus -- to have no printer fonts and to use only
downloaded fonts. It is also not possible to set the maximum downloaded
fonts to zero.
I had told it to use only printer fonts and, since I had no way to tell it
that this printer had a lot of fonts, it was substituting courier for all
but the first downloadable font.
In case you do not know it: when you print postscript to a printer, it
downloads all the fonts you use (assuming you have them on disk) to the
printer within the body of the file -- unless they are built-in fonts for
that printer. My commercial software h ad used that information to convert
anything I sent it, since I had caused the same data to be printed to disk.
I had assumed that Ghostscript did not understand these downloaded fonts,
since the documentation seemed to say that you had to build all fonts into
the FontMap first -- which is the same as building them into one's virtual
printer.
Anyway, I tried an experiment. I deleted every font from the FontMap file
except those that normally come built into an AppleLaserWriter Plus. I set
the printer driver to download all fonts except those standard 35. And...
I discovered that Ghostscript do es support downloaded fonts. This means
that once I set up the basic FontMap, I did not have to manually enter new
fonts. I just use them as I would on a printer, by installing them in the
font Palette.
I then tackled the command line. In my previous set up I had automated the
process. I printed postscript files to a particular directory and then
clicked on an icon that started a DOS batch process (plus a short compiled
BASIC program to restore the file name lost during conversion) that ended
up leaving a DCX (multi-page PCX) file in the FaxWorks directory. Faced
with Ghostscript's command line, I decided to redo the batch process as an
OS/2 batch process.
Ghostscript does not seem to support DCX. On the other hand, it does give
one the flexibility to name files anything one wishes and to insert page
numbers in the file names. So, for example, if you convert TEST.PS, a five
page postscript file, to PCX you could specify the output as Test%d.pcx and
get: Test1.pcx, Test2.pcx.... I was having trouble mixing the batch
file's "%1" structure and the %d structure of GS page numbering (you have
to put two %s before the d within a batch file, I discovered) and did not
want loose pages scattered all throughout my Faxworks directory, so I had
the batch file create a directory named for the original file (TEST.PS, for
example) and stick pages into it labelled Page1.pcx, Page2.pcx, etc. My
next project will be to learn REXX and use string handling to remove the
".ps" from the file name before creating the sub-directory. Unless someone
wants to contribute this.
My last step, at 2:00 am, was to add a DOS utility, MAKEDCX.EXE, I got from
the Intel BBS and on Compuserve which collects PCX one page files into one
DCX multi-page file. I had it automatically add a Multipage file to each
directory. I have the flexibili ty to use single pages or the entire
document.
I hate having to resort to DOS, so if anyone wants to write this utility
for OS/2....
There are a lot of things that should be added: error handling if there
are existing pages in the sub-directory. Concatenation. Etc. I also will
experiment with drag and drop and file associations.
INSTALLATION
I have not had time to figure out how you tell Ghostscript where its fonts
are. The environment method does not seem to work, nor does the command
line "-l" for this purpose.
Out of expediency, I simply either install Ghostscsript in my PSfonts
directory (where the fonts already are) or install the 35 or so standard
fonts (plus UGLY!) in a Ghostscript directory.
So simply copy the files in the BARR directory (after unzipping) to
whatever directory you will use.
Unzip the emx-dll.zip and put the *.dll files into OS2\DLL -- unless you
already have more recent ones.
Go out and get the standard PS fonts (standard issue plus the Adobe Plus
Pack) and make sure that Ghostscript knows where they are. (If you know
how to do this, please tell me. If not, put them in the same directory.)
Edit the FontMap file to reflect any differences in your basic fonts. You
will find the FontName in the PFB file for each font.
If you want the GS fonts, please download them and use the standard issue
FontMap file from the GS directory, which contains all the original GS
files, except fonts.The GS fonts approximate the standard issue postscript
fonts on printers.
You should also change MKPMFax1.CMD and MKPMFax2.CMD to reflect your
directory structure -- or fax software.
They are really very simple batch files -- or I wouldn't have been able to
write them. Number 1 goes through all *.ps files in the named directory
(do not use the Ghostscript directry, since some of their files are named
*.ps) and passes them to the secon d batch file one by one. The second
file creates a subdirectory within my Fax directory and converts the *.ps
file to PCX within it. Then the two processes do some house keeping.
I have left in the optional PCX to DCX conversion process in batch file 2.
You can put the MAKEDCX.EXE anywhere as long as DOS will recognize the
directory name. I think "Ghostscript" is too long.
Then create an object -- icon -- for the first batch file and use it to
launch the process.
FILES
I have included the files I use (including the UGLY font) in the BARR
directory. I have included the standard GS package (ex fonts and ex files
I have not altered) in the GS directory.
COPYRIGHT AND WARRANTY
There is a detailed statement about copying Ghostscript in the COPYING file
included in GS -- pretty far down in the chain of sub-directories. It
applies to this whole package. And, as I said at the beginning, I am not
experienced with any of these thing s, so if you rely on my work in
progress and lose data or whatever, it's your own fault.