Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8577409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:09:12+00:00 2026-06-11T20:09:12+00:00

stream { 360 mul sin 2 div exch 360 mul sin 2 div add

  • 0
stream
{ 360 mul sin
2 div
exch 360 mul sin
2 div
add
}
endstream

Can someone please explain this syntax to me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T20:09:13+00:00Added an answer on June 11, 2026 at 8:09 pm

    This doesn’t look like PDF to me:

    • stream and endstream are PDF keywords, yes.

    • But the rest rather looks like PostScript.

    So stream and endstream could also be PostScript variables or functions, defined elsewhere (before) in the same code…


    As PostScript, the code means:

    • { and } are just separators that structure the code into blocks
    • 360 mul sin: multiply by 360 (multiply what? => the value that’s topmost on the stack), compute the sinus value for the result, and put this as topmost on the stack.
    • 2 div: divide the topmost value on the stack by 2.
    • exch 360 mul sin: swap the 2 topmost items on the stack, multiply the item that’s now topmost by 360, compute the sinus of it and put it back on the stack.
    • 2 div: divide the topmost value on the stack by 2.
    • add: add the 2 topmost values on the stack.

    Update:

    Ouch!

    I had completely forgotten about the details of the (very limited) PostScript function objects which the PDF spec allows inside PDF documents. These represent self-contained and static numerical transformations.

    So my above explanation of the PostScript code as a calculator function is still valid, and it looks to me like describing a ‘spot function’ for a halftone screen. (However, stream and endstream in this context of course do keep their original meanings as PDF keywords, and the curly braces { and } are required to enclose the function definition.)

    Since the PDF spec for these PostScript function objects does not allow the use of arrays, variables, names or strings, but only integers, reals and booleans as values, the processing of these code segments doesn’t require a fully fledged PostScript interpreter, and this statement in the spec:

    “PDF is not a programming language, and a PDF file is not a program.”

    does still apply and makes still the PDF language very different from PostScript (which is a programming language, and PS files are programs).

    Keeping in mind, that PostScript is a stack-based language, and understanding its code by thinking of a pocket calculator that uses ‘reverse Polish notation’ conventions will help you wrapping your mind around this topic…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I baselined a stream this morning, but someone made changes to a couple files
This is the data stream, (Hope I'm displaying this correctly, it took me forever
I need to stream a media file from another server through this php file.
How can this be? Looks like plain as daylight an exception from a third
How can I stream audio from the microphone of an iPhone to a Mac/PC?
In my music stream program, how can I set proxy on android.media.MediaPlayer class for
Input/Output stream operators associativity in theory: LEFT TO RIGHT (for example, according to this:
I need to stream audio from a location that can't be directly accessible to
Consider this JSON { stream: { posts: [{ post_id: 1, post_type: text, post_thumb: bla1,
I created a feature stream yesterday. Mainstream(US Mastership) | |----FeatureStream(US Mastership) | |---FeatureStreamIndia(India Mastership)

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.