Skip to main content
Inspiring
March 25, 2008
Question

Escape Characters

  • March 25, 2008
  • 5 replies
  • 2053 views
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 has been closed for replies.

5 replies

Inspiring
April 2, 2008
Hi,

I had to put \\ (double slashes) to display the ( special characters.
Thanks for your help.
Inspiring
March 27, 2008
Hi,

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

Thanks,

Karthik
Participating Frequently
March 27, 2008
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
Participating Frequently
March 26, 2008
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
Inspiring
March 25, 2008
Hi Aandi,

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

Thanks,

Krishnan
Participating Frequently
March 26, 2008
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
Participating Frequently
March 25, 2008
That looks correct.

Aandi Inston