Copy link to clipboard
Copied
ps
pr
shpg
I have a postscript file (Adobe 3.0, Language-Level 2) that contains what seems to be the short-form of operators. Where can I find a reference to help identify what these commands are. My best guess is that "ps" is pstack, "pr" is print, but it could also be product or prompt, and "shpg" is showpage.
Thanks
1 Correct answer
There is no such thing as a PostScript Short-Form Operator Reference because there is no such thing as a “PostScript Short-Form Operator.”
What you are actually seeing are procedure calls where the procedures that you are seeing such ps, pr, and shpg are typically defined in a header at the beginning of the PostScript file. Those procedures may contain one or any number of native PostScript operators as well as calls to other previously-defined procedures.
In fact, PostScript is a stack-oriented p
...Copy link to clipboard
Copied
There is no such thing as a PostScript Short-Form Operator Reference because there is no such thing as a “PostScript Short-Form Operator.”
What you are actually seeing are procedure calls where the procedures that you are seeing such ps, pr, and shpg are typically defined in a header at the beginning of the PostScript file. Those procedures may contain one or any number of native PostScript operators as well as calls to other previously-defined procedures.
In fact, PostScript is a stack-oriented programming language in reverse Polish notation with macro definition capabilities.
- Dov
Copy link to clipboard
Copied
In the earlier days where the memory of the printer is limited and the processor speed was much less
This was technique recommended by the Green Book and used by many developers
Create short form procedures with short characters names to substitute many or postscript operators which repeated quite often!
and the feature here is to use the Postscript bind feature /pn { 255 string cvs show } bind def % this will print any numeric variable
This will make the execution faster if " 255 string cvs show " is repeated quite often in your code - and the short name should process faster than long name of procedure
Now with the speed of processor and the increase of memory you may not need it - however still recommended to use bind
Regards
Adam

