Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing PS Text Error

Status
Not open for further replies.

nigelkf

Programmer
Nov 24, 2011
1
GB
I am trying to use PS to display our company logo on some documents. The graphics work fine drawing the 'pretty' bits. When I tried to add the words to the graphic everything stopped working. I tracked it down to just this section which does not work, it does not produce anything on the printer.

%!PS
/Courier findfont
12 scalefont
setfont
(tgb) show
showpage

If I view the result in Ghostscript and GS View I get the following error message...

===error message starts===
Error: /nocurrentpoint in --show--
Operand stack:
(tgb)
Execution stack:
%interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- false 1 %stopped_push 1862 1 3 %oparray_pop 1861 1 3 %oparray_pop 1845 1 3 %oparray_pop 1739 1 3 %oparray_pop --nostringval-- %errorexec_pop .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval--
Dictionary stack:
--dict:1156/1684(ro)(G)-- --dict:0/20(G)-- --dict:73/200(L)--
Current allocation mode is local
Last OS error: No such file or directory

--- Begin offending input ---
%!PS

/Courier findfont
12 scalefont
setfont
(tgb) show

showpage

--- End offending input ---
file offset = 0
gsapi_run_string_continue returns -101
===error message ends===

Since this code is taken from one of the online PS tutorials i don't see what the problem is. Any suggestions will be thankfully received.

 
Hello
just add "x y moveto" (with x ,y position of your text)
before your code,
PS needs to know where to write
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top