Home | Gallery | Forum | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com Forum
OS2 World.Com Online Discussion Forum.
Index / OS/2 - General / Applications
author message
Properly configuring GhostScript to work from other apps...
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
RobertM
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 152
since: 16 Aug, 2004
1. Properly configuring GhostScript to work from other apps...
Reply to this topic with quote Modify your message
last updated at 04 Jun, 2006 19:20 (1 times)
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
Operand stack:
1.0 Times-Roman Font Times-Roman 249553 Times-Roman --nostringval-- Times-Roman TimesNewRoman

Any help would be greatly appreciated.

Thanks,
Robert

Date: 04 Jun, 2006 on 19:18
Christian Hennecke
Premium member
in spoc

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.os2world.com/os2files/
posts: 109
since: 27 Jan, 2001
2. Re:Properly configuring GhostScript to work from other apps...
Reply to this topic with quote Modify your message
Did you adapat the Fontmap file in the Ghostscript lib directory? Copying Fontmap.OS2 to Fontmap should be sufficient.
Date: 05 Jun, 2006 on 15:08
RobertM
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 152
since: 16 Aug, 2004
3. Re:Properly configuring GhostScript to work from other apps...
Reply to this topic with quote Modify your message
last updated at 05 Jun, 2006 19:29 (1 times)
Hi!

I tried that... no go. The odd thing is, it will say something like:
"searching for tnr.pfb... "
"Searching C:\PSFonts... not found or could not be opened."
"Searching d:\GSTools\Fonts... not found or could not be opened."

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.

Date: 05 Jun, 2006 on 19:27
Christian Hennecke
Premium member
in spoc

View this member's profileSearch all posts from this memberSend an email to this memberhttp://www.os2world.com/os2files/
posts: 109
since: 27 Jan, 2001
4. Re:Properly configuring GhostScript to work from other apps...
Reply to this topic with quote Modify your message
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.
Date: 06 Jun, 2006 on 15:59
RobertM
Premium member
in user

View this member's profileSearch all posts from this memberSend an email to this member
posts: 152
since: 16 Aug, 2004
5. Re:Properly configuring GhostScript to work from other apps...
Reply to this topic with quote Modify your message
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 ).
Date: 06 Jun, 2006 on 16:18
Properly configuring GhostScript to work from other apps...
Post a new topic Reply to this Topic Printable Version of this Topic Forward this Topic to your Friend Topic Commands (for administrator or moderators only)
All times are CET+1. < Prev. | P. 1 | Next >
Go to:
 

Powered by UltraBoard 2000 Standard Edition,
Copyright © UltraScripts.com, Inc. 1999-2000.
Home | Gallery | Forums | Services | Webmail | Archive | Links | Contact Us | About Us
OS2 World.Com 2000-2004