[softwarelist] Re: OPro script prpagew() (RISC OS)

  • From: David Pilling <david@xxxxxxxxxxxxxxxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Mon, 15 Aug 2016 14:01:37 +0100

Hi Gavin,

These functions are returning the bounding boxes of the pages in the document - point being information for the file and the page have to be set up.

As I dimly recall we print sheets of paper, and on each sheet of paper we print the pages.

So returning the page bounding box requires being inside both loops. Both sheets and pages on sheet.

One problem is that the event PRSTARTPAPER is issued at the start of the outside loop.

Seems no doubt that immediately after PRSTARTPAPER these functions do not have the information needed to return successfully.

(a bit more complex, the first time they'll probably work because memory is set to zero, but the next time memory will be set 1 over the end value of the page loop, and guaranteed to be wrong).

The event you require is:

EVENT_PRSTARTPAGE

At which point the page should be set up.

Conclusion - bug in the docs - page 77 of the handy Script Language reference guide in my desk.

Take out big red highlighter "CURSE HIM, CURSE HIM".

--
David Pilling
www.davidpilling.com
To unsubscribe or subscribe goto: //www.freelists.org/list/davidpilling

Other related posts: