Skip to main content
Inspiring
Mar 25, 2008 7:57 PM UTC
Question

Escape Characters

Hi,

I am trying to print out text with forbidden characters. For example, I am trying to print (Hello World) on the postscript file.

this is what I have

175 602 moveto (\(Hello World\)) show

This line is not loaded. Please help me.
This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

Inspiring
Apr 2, 2008 4:40 PM UTC
Hi,

I had to put \\ (double slashes) to display the ( special characters.
Thanks for your help.
Translate
Inspiring
Mar 27, 2008 4:52 AM UTC
Hi,

The Ghostscript view just gives me a message. Loading.......

Thanks,

Karthik
Translate
Participating Frequently
Mar 27, 2008 7:10 AM UTC
That isn't an error. Maybe you could post a complete program, not just
one line, and we could test it ourselves with different interpreters.

Aandi Inston
Translate
Participating Frequently
Mar 26, 2008 7:35 AM UTC
You need to define a font before you use "show", e.g.

/Helvetica findfont 10 scalefont setfont

Then GhostScript will work, Acrobat (6) will work, Preview will work.
Without it neither will work.
It seems that these guys do not have a default font.

Miklos
Translate
Inspiring
Mar 25, 2008 10:57 PM UTC
Hi Aandi,

I got to replace ( by using \( but \) can not be compiled by Ghostscript.

Thanks,

Krishnan
Translate
Participating Frequently
Mar 26, 2008 7:20 AM UTC
The line you posted is valid PostScript. So something else is wrong.
GhostScript doesn't compile anything, it interprets. I guess you are
getting an error - what is it?

Aandi Inston
Translate
Participating Frequently
Mar 25, 2008 8:33 PM UTC
That looks correct.

Aandi Inston
Translate