| Subject | : | Properly configuring GhostScript to work from other apps... |
| Author | : | RobertM |
| Date | : | 04 Jun, 2006 on 19:18 |
| Hi, I have GhostScript v8.14 and GSView installed on my system. GSView works fine and I can generate pdfs from other formats (such as eps, bmp, etc) from GSView and view pdfs from within GSView with it using GhostScript - all with no errors... But, when I try to call GhostScript from the command line or use GLE to try to generate PDFs I get font not found errors. It successfully generates a PDF with all lines, boxes, et all, but no text (as it cant find the fonts necessary). GLE will successfully generate an eps file, which I can load in GSView and then export as a pdf with all text, fonts, etc. I realize that this is some sort of configuration error - and am guessing it is something to do with an environment value not being set (while I am assuming that GSView is sending font locations to GhostScript using a commandline param), but I dont know what SET ENV statement to use, or what the proper value is. I have currently figured out all the config.sys statements to get it to properly find and initialize GhostScript, but not the font one. I *think* I know what environment variable is the culprit, but dont know what should be assigned to it. The environment vars as currently set are: Set GS_LIB=D:\gstools\gs8.53\lib;D:\GSTools\gs8.53\bin; Set GS_FONTPATH=D:\GSTools\fonts;C:\PSFonts;D:\gstools\gs8.53\lib;D:\GSTools\gs8.53\bin; Which still results in fonts not found (any fonts - all of which I know are present in the above directories). For those not familiar with it, GLE will create an eps file, then call GhostScript with the proper parameters to convert it to a pdf file, (and in my case, GhostScript will then generate font not found errors). Writing a GLE file, running GLE to create an eps file, loading that eps in GSView, converting it from GSView to a pdf (which GSView uses GhostScript to do) works fine with no font errors. So the problem is the same exact eps file generated with GLE will not work when GLE tries calling GhostScript. I want to automate this (write a GLE file, convert to PDF using GLE), but cannot figure out what part of my configuration is incorrect, and since (1) I cannot see what the font statement GSView uses, I cant make the appropriate changes to my config.sys, and (2) since I cannot figure out how (assuming I knew that info) to get GLE to insert additional commandline options into it's GhostScript call, I cannot get rid of the error with additional directives sent directly to GhostScript (which is what I am assuming GSView is doing). The error I get from GhostScript is: Error: /invalidfont in findfont Any help would be greatly appreciated. Thanks, |
| Subject | : | Re:Properly configuring GhostScript to work from other apps... |
| Author | : | Christian Hennecke |
| Date | : | 05 Jun, 2006 on 15:08 |
| Did you adapat the Fontmap file in the Ghostscript lib directory? Copying Fontmap.OS2 to Fontmap should be sufficient. |
| Subject | : | Re:Properly configuring GhostScript to work from other apps... |
| Author | : | RobertM |
| Date | : | 05 Jun, 2006 on 19:27 |
| Hi! I tried that... no go. The odd thing is, it will say something like: The font and related files are in both directories and also installed in OS/2 - is it possible OS/2 has the font files locked? Etc... but if I run GSOS2 or run GLE from the GSTools\Fonts directory, it does find them and all runs well. Currently I am using a simple rexx script to changedir to the directory with the fonts, run GLE with the create pdf option, and then change back to the original directory. That works fine - whether using the gs fontmap or OS2 fontmap file. |
| Subject | : | Re:Properly configuring GhostScript to work from other apps... |
| Author | : | Christian Hennecke |
| Date | : | 06 Jun, 2006 on 15:59 |
| I think I just found the reason. I didn't look closely enough at first, but you are using backslashes in the environment variables. For Ghostscript, forward slashes have to be used. |
| Subject | : | Re:Properly configuring GhostScript to work from other apps... |
| Author | : | RobertM |
| Date | : | 06 Jun, 2006 on 16:18 |
Thanks! Will give it a try... shoulda guessed that one since it's a *nix port, but I guess I am getting senile (or maybe I always have been ). |