# How to configure Ghostscript



## tkumar (May 11, 2010)

Hi All,

Appreciate some help on how to configure Ghostscript.

Thank you.


----------



## lotuseclat79 (Sep 12, 2003)

Hi tkumar,

Welcome to TSG!

You might try the Install document (Install.htm link) at: Overview of Ghostscript.

-- Tom


----------



## tkumar (May 11, 2010)

Hi Tom,

Thanks for the info above. I have installed/configured the ghostscript successfully now. All *.doc and word files are working find when converted to pdf. But only *.dwg(Autocad Drawing file) is not properly converted. For instance, after the conversition to pdf I am not able to search any text within the pdf file. This does not happen to the *.doc files.

Is there any way to make the *.dwg file also text searchable after being converted to pdf.

Regards,
Kumar


----------



## IMM (Feb 1, 2002)

This might depend on how the .dwg file was produced.
There might be direct conversion routines - but I'd recommend the old tried and true methods.
Install a postscript printer for windows, and set it to produce FILEs rather than to use a port such as LPT1.
Print the file to this printer from ACAD or the viewer.
Then you can 'pick up' the resultant .ps print file in GS to convert.
If you are making the .dwg files yourself - check that the settings aren't automatically rasterizing the fonts for you as it's saved.


----------



## tkumar (May 11, 2010)

Hi IMM,

I am using the Bentley View XM Edition to view the CAD files and I am able to search for the tgext within this viewer. As suggested above I tried to produce the .ps files using both (HP LaserJet 6P/6MP PostScript and Acrobat Distiller) then by using GSview 4.9 I tried to search the text and its no longer searchable here. 

If I do the same thing on a .doc file GSview 4.9 picks up the text that I am searching for.

Regards,
Kumar


----------



## IMM (Feb 1, 2002)

Which ACAD version are they rpoduced with ?


----------



## tkumar (May 11, 2010)

Tried with 2000/2004/2007


----------



## IMM (Feb 1, 2002)

You could try this:
http://www.pstoedit.net/pstoedit
Is GSView installed ?


----------



## tkumar (May 11, 2010)

Yes I have GSView installed and configure to run with Ghostscript.


----------



## tkumar (May 11, 2010)

As soon as the file gets converted to .ps the text is being rasterized. Is there any setting / any other postscript printers that I can use instead?


----------



## IMM (Feb 1, 2002)

I had hoped that pstoedit might do something about font mappings. W/O seeing the file I'm really guessing - but the problem is likely SHX fonts. In Autocad, you should be able to set up font mappings to control the output and/or select TTF or postscript fonts for the dwg.
Unless I see some of the file - it's hard to guess further.


----------



## tkumar (May 11, 2010)

Hi IMM,

here are the files that i am using at the moment. Am able to find the text using the CAD viewer but no more after it was converted to .ps.

.ps file : https://docs.google.com/leaf?id=0B4qG-wrDi3yEYjZjYzkyODctZDNkNy00MTI3LTg2MjctNTEyOWVkNWJmNWVj&hl=en

.dwg file: https://docs.google.com/leaf?id=0B4qG-wrDi3yEYjg1MDljN2YtYWE0ZC00MTlkLWI2M2YtZGY2ZDgxM2EwOGMz&hl=en


----------



## IMM (Feb 1, 2002)

My browser won't touch google docs - I'm happy about that and I'm keeping it that way.


----------



## tkumar (May 11, 2010)

Its not converted to google docs. Instead I have just uploaded it there. These files remain as their original format.


----------



## IMM (Feb 1, 2002)

It's actually a bit of a problem for me to test with what is on my system at the moment - but I get indexable text if I convert it to the interchange format first (dwg --> dxf)
Then I can open it with something like openoffice3's Draw and export it as a pdf (the text responds to search in the pdf)
Maybe produce the dxf from acad ?

For conversion - I used the _ODA Teigha File Converter_ from 
http://www.opendesign.com/guestfiles


----------



## IMM (Feb 1, 2002)

It might be a problem with something like the ISOCPEUR or similar (ISO proportional) fonts ?
When I converted to dxf - I think I got verdana as the substitute.


----------



## tkumar (May 11, 2010)

Hi IMM,

Thanks for the suggestion to use dfx, but I can only use Ghostscript which then only uses .ps files. I am using Ghostscript as it can be adapted within another program that I run. 

All .doc files works fine with Ghostscript except .dwg, guess it might be a limitation or something.


----------



## IMM (Feb 1, 2002)

The dwg file is a bit hard to handle as it's not all that well documented and there are many variations of it.
If you can -- try and fix the fonts at the autocad end which produces it.

There is a framework in development called LibreDWG (*GNU*) which will make this sort of thing much more readily manageable -- but apps developed with it aren't really primetime yet.
If you have a programming 'bent' - it might interest you.


----------

