home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 5 / DATAFILE_PDCD5.iso / utilities / r / rs_hints / WindowsPS < prev   
Text File  |  1996-03-08  |  3KB  |  61 lines

  1. Using Windows PS files with RiScript
  2. ------------------------------------
  3.  
  4. Windows PS files rarely work first time with RiScript.  Often, you will
  5. find you just get the RiSc> prompt back almost immediately and a blank
  6. document displayed.  Other times, there will be postscript errors which
  7. look very impenetrable and rather useless.
  8.  
  9. The first thing to check is that new lines are in the RISC OS form (ie.
  10. just line feeds, no carriage returns).  If this is not the case, RiScript
  11. will try to interpret the ^M characters which are on the end of each
  12. line.  With Zap, you can easily convert the PS file by loading it in,
  13. deselecting the DOS text mode option from the menu and saving again.
  14. Other editors will have different ways of doing this.
  15.  
  16. The second problem is that Windows includes its own error handler by
  17. default, which tries to print the error on the page, rather than leave
  18. the interpreter to report it.  This causes a slight problem if another
  19. error occurs while it is trying to display the error!  This problem is
  20. easily fixed by searching for a line:
  21.  
  22. ErrHandler
  23.  
  24. which usually appears shortly after %%BeginSetup, and removing it.  This
  25. will ensure that any errors which occur will get reported correctly.
  26.  
  27. Having done this, the most likely error to get is
  28.     %%[Error: undefined; OffendingCommand: --get--]%%
  29. followed by a stack dump ending with /CharStrings
  30.  
  31. The problem here is that the Window PS driver is trying to determine
  32. whether a particular character is present in a font.  This fails with
  33. RiScript as it uses special font definitions to work with the RISC OS
  34. font manager and the font dictionaries do not contain a CharStrings
  35. entry.
  36.  
  37. The solution is to search for the text
  38.     /IsChar{basefontdict /CharStrings get exch known}bd
  39. (which may be split over a line break) and replace it with
  40.     /IsChar{pop true}bd
  41.  
  42. This simply means that the postscript program will always think that the
  43. relevant character is known, without needing the CharStrings dictionary.
  44. There is no problem with reporting all characters as known since the
  45. RISC OS fonts do contain all the characters.
  46.  
  47. Usually, the PostScript file will now be displayed with no further errors
  48. but you may find that any shading goes outside the bounds of the area
  49. which it is supposed to fill.  This is caused by RiScript not supporting
  50. clip paths and is unavoidable.  You may also get red boxes appearing if
  51. this happens.  The red boxes are printed to indicate where the clip
  52. paths would be but aren't really very useful.
  53.  
  54. Editing !RiScript.System.NYI and replacing the definition of /clip with
  55.     /clip {} def
  56. will prevent these annoying red boxes being displayed but will not help
  57. the overflow of fills.
  58.  
  59. -- 
  60. Chris Poole, c.e.poole@iee.org.uk, 8-3-96
  61.