home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 19 Printer / 19-Printer.zip / ps2fax.zip / READ.ME < prev   
Text File  |  1993-07-07  |  9KB  |  184 lines

  1. DISCLAIMER 
  2.  
  3. I am not a programmer.  In fact, I have not even had time to learn REXX 
  4. scripts.  I am sure that there are better ways -- much better ways -- to do 
  5. what I have tried to do in this little package.  It seems to work for me, 
  6. but I only did it late last night -- so who knows.  I offer it free of 
  7. price and any warranty implied or explicit.  
  8.  
  9. BACKGROUND 
  10.  
  11. I have used a commercial DOS product to convert the postscript output of 
  12. various word processors and DTP programs to fax format.  I send out more by 
  13. fax than be mail, and much of my work is done from hotel rooms while I am 
  14. travelling.  
  15.  
  16. OS/2 2.1 has a bug that, on some machines, causes it not to release more 
  17. conventional memory in DOS windows with Video_Mode_Restriction set to CGA.  
  18. I need the extra memory to handle downloadable fonts under the DOS program 
  19. (it reminds one why we migrated to OS/2 in the first place -- such 
  20. considerations).  This bug his my notebook -- the machine I most need for 
  21. fax conversion.  And I am leaving on a long trip to London Saturday.  
  22.  
  23. So I stayed up late last night playing with Ghostscript.  
  24.  
  25.  
  26. GHOSTSCRIPT 
  27.  
  28. Although Ghostscript has been ported to OS/2, I never thought of it as an 
  29. alternative (until forced to yesterday) for several reasons.  Its 
  30. documentation is chaotic and opaque (at least to this semiliterate computer 
  31. user).  I believed that it only supported a motley collection of homemade 
  32. fonts of dubious quality and would not convert my commercial Adobe type 1 
  33. fonts.  I did not believe that it supported graphics output of the sort I 
  34. needed.  
  35.  
  36. Under pressure, however, I re-explored it and discovered that most of my 
  37. impressions were in error -- except those concerning the documentation.  
  38.  
  39. The documentation mentions, rather casually, that Ghostscript supports all 
  40. fonts that would normally work with a postscript interpreter.  It even 
  41. showed how to install these fonts in a FontMap file.  By typing "-h" on the 
  42. command line, I also learned that it supported PCX output, in addition to 
  43. other graphics and printer formats.  
  44.  
  45. THE EVOLUTION OF MY LITTLE PACKAGE 
  46.  
  47. I decided that, for now, I did not care to use any of their fonts -- except 
  48. "UGLY", which is required as a default.  So I deleted them from the 
  49. Ghostscript directory.  They have the suffix:  "gsf".  Next I painstakingly 
  50. amended the FontMap file to refer to al l the commercial fonts installed on 
  51. my disk.  There are about fifty.  
  52.  
  53. I did this -- to avoid typing errors -- by taking the old FontMap as a 
  54. template and changing entries one by one.  I looked at each font's "pfb" 
  55. file and copied the exact font name to clipboard (using Enhanced Editor).  
  56. I then substituted the name for one I had deleted and entered the file 
  57. name:  "*.pfb*.  
  58.  
  59. It did not seem to work properly.  In the process of fiddling, I discovered 
  60. that there is no way to configure an OS/2 printer driver -- like 
  61. AppleLaserWriter Plus -- to have no printer fonts and to use only 
  62. downloaded fonts.  It is also not possible to set the maximum downloaded 
  63. fonts to zero.  
  64.  
  65. I had told it to use only printer fonts and, since I had no way to tell it 
  66. that this printer had a lot of fonts, it was substituting courier for all 
  67. but the first downloadable font.  
  68.  
  69. In case you do not know it:  when you print postscript to a printer, it 
  70. downloads all the fonts you use (assuming you have them on disk) to the 
  71. printer within the body of the file -- unless they are built-in fonts for 
  72. that printer.  My commercial software h ad used that information to convert 
  73. anything I sent it, since I had caused the same data to be printed to disk.  
  74. I had assumed that Ghostscript did not understand these downloaded fonts, 
  75. since the documentation seemed to say that you had to build all fonts into 
  76. the FontMap first -- which is the same as building them into one's virtual 
  77. printer.  
  78.  
  79. Anyway, I tried an experiment.  I deleted every font from the FontMap file 
  80. except those that normally come built into an AppleLaserWriter Plus.  I set 
  81. the printer driver to download all fonts except those standard 35.  And...  
  82. I discovered that Ghostscript do es support downloaded fonts.  This means 
  83. that once I set up the basic FontMap, I did not have to manually enter new 
  84. fonts.  I just use them as I would on a printer, by installing them in the 
  85. font Palette.  
  86.  
  87. I then tackled the command line.  In my previous set up I had automated the 
  88. process.  I printed postscript files to a particular directory and then 
  89. clicked on an icon that started a DOS batch process (plus a short compiled 
  90. BASIC program to restore the file name lost during conversion) that ended 
  91. up leaving a DCX (multi-page PCX) file in the FaxWorks directory.  Faced 
  92. with Ghostscript's command line, I decided to redo the batch process as an 
  93. OS/2 batch process.  
  94.  
  95. Ghostscript does not seem to support DCX.  On the other hand, it does give 
  96. one the flexibility to name files anything one wishes and to insert page 
  97. numbers in the file names.  So, for example, if you convert TEST.PS, a five 
  98. page postscript file, to PCX you could specify the output as Test%d.pcx and 
  99. get:  Test1.pcx, Test2.pcx....  I was having trouble mixing the batch 
  100. file's "%1" structure and the %d structure of GS page numbering (you have 
  101. to put two %s before the d within a batch file, I discovered) and did not 
  102. want loose pages scattered all throughout my Faxworks directory, so I had 
  103. the batch file create a directory named for the original file (TEST.PS, for 
  104. example) and stick pages into it labelled Page1.pcx, Page2.pcx, etc.  My 
  105. next project will be to learn REXX and use string handling to remove the 
  106. ".ps" from the file name before creating the sub-directory.  Unless someone 
  107. wants to contribute this.  
  108.  
  109. My last step, at 2:00 am, was to add a DOS utility, MAKEDCX.EXE, I got from 
  110. the Intel BBS and on Compuserve which collects PCX one page files into one 
  111. DCX multi-page file.  I had it automatically add a Multipage file to each 
  112. directory.  I have the flexibili ty to use single pages or the entire 
  113. document.  
  114.  
  115. I hate having to resort to DOS, so if anyone wants to write this utility 
  116. for OS/2....  
  117.  
  118. There are a lot of things that should be added:  error handling if there 
  119. are existing pages in the sub-directory.  Concatenation.  Etc.  I also will 
  120. experiment with drag and drop and file associations.  
  121.  
  122. INSTALLATION 
  123.  
  124. I have not had time to figure out how you tell Ghostscript where its fonts 
  125. are.  The environment method does not seem to work, nor does the command 
  126. line "-l" for this purpose.  
  127.  
  128. Out of expediency, I simply either install Ghostscsript in my PSfonts 
  129. directory (where the fonts already are) or install the 35 or so standard 
  130. fonts (plus UGLY!)  in a Ghostscript directory.  
  131.  
  132. So simply copy the files in the BARR directory (after unzipping) to 
  133. whatever directory you will use.  
  134.  
  135. Unzip the emx-dll.zip and put the *.dll files into OS2\DLL -- unless you 
  136. already have more recent ones.
  137.  
  138. Go out and get the standard PS fonts (standard issue plus the Adobe Plus 
  139. Pack) and make sure that Ghostscript knows where they are.  (If you know 
  140. how to do this, please tell me.  If not, put them in the same directory.)  
  141.  
  142. Edit the FontMap file to reflect any differences in your basic fonts.  You 
  143. will find the FontName in the PFB file for each font.  
  144.  
  145. If you want the GS fonts, please download them and use the standard issue 
  146. FontMap file from the GS directory, which contains all the original GS 
  147. files, except fonts.The GS fonts approximate the standard issue postscript 
  148. fonts on printers.  
  149.  
  150. You should also change MKPMFax1.CMD and MKPMFax2.CMD to reflect your 
  151. directory structure -- or fax software.  
  152.  
  153. They are really very simple batch files -- or I wouldn't have been able to 
  154. write them.  Number 1 goes through all *.ps files in the named directory 
  155. (do not use the Ghostscript directry, since some of their files are named 
  156. *.ps) and passes them to the secon d batch file one by one.  The second 
  157. file creates a subdirectory within my Fax directory and converts the *.ps 
  158. file to PCX within it.  Then the two processes do some house keeping.  
  159.  
  160. I have left in the optional PCX to DCX conversion process in batch file 2. 
  161. You can put the MAKEDCX.EXE anywhere as long as DOS will recognize the 
  162. directory name.  I think "Ghostscript" is too long.  
  163.  
  164. Then create an object -- icon -- for the first batch file and use it to 
  165. launch the process.  
  166.  
  167. FILES 
  168.  
  169. I have included the files I use (including the UGLY font) in the BARR 
  170. directory.  I have included the standard GS package (ex fonts and ex files 
  171. I have not altered) in the GS directory.  
  172.  
  173. COPYRIGHT AND WARRANTY 
  174.  
  175. There is a detailed statement about copying Ghostscript in the COPYING file 
  176. included in GS -- pretty far down in the chain of sub-directories.  It 
  177. applies to this whole package.  And, as I said at the beginning, I am not 
  178. experienced with any of these thing s, so if you rely on my work in 
  179. progress and lose data or whatever, it's your own fault.  
  180.  
  181.   
  182.  
  183.  
  184.