Multiple pages

WORK IN PROGRES. A book has multiple pages, so has PDF. We will extend the rpnPDFdevice to support multiple pages. PostScript already provides multi page support through the showpage operator. Each time showpage renders the page, initatiates the graphics and starts a new page. However, our main loop must tell all the devices to clean up when we are at the end of the code. But this should happen only on the main loop, not when rpn is called inside the context. rpn will delegate this to context so it does not have to know about the devices.

Javascript Editor

We add empty functions to the devices to test if it works

Javascript Editor

And we add now a code for 3 pages and look what happens

Javascript Editor

My Journey to PostScript