Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

PostScript Short-Form Operator Reference

New Here ,
Jan 06, 2016 Jan 06, 2016

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

TOPICS
Programming
1.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Jan 06, 2016 Jan 06, 2016

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

...
Translate
Jan 06, 2016 Jan 06, 2016

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

- Dov Isaacs, former Adobe Principal Scientist (April 30, 1990 - May 30, 2021)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 19, 2016 Jan 19, 2016
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines