[softwarelist] Re: OPro - request for new Script functions

  • From: Gavin Crawford <gav@xxxxxxxxxxxxxx>
  • To: davidpilling@xxxxxxxxxxxxx
  • Date: Wed, 18 Jan 2017 22:35:18 GMT

In message <7101b608-5082-a183-9b26-68cfac46ce33@xxxxxxxxxxxxxxxx>
          David Pilling <david@xxxxxxxxxxxxxxxx> wrote:

Hi Gavin,

On 18/01/2017 19:06, Gavin Crawford wrote:
This is a request for a couple of new functions to be added to the
Printing functions in the Script Language

Win or RISC OS?

Sorry David - RISC OS. I meant to add that to the subject line.

I'm using the event (0x104) EVENT_PRSTARTPAGE to notify me when a page
is being printed, at which point I'd like a way of finding out the
document's page & chapter number that is being being printed. Maybe
something along the lines of:

 From distant memory does the print imposition script not know this
information - does it not say which pages to put on each sheet of paper.

Ah maybe, but I'm not approaching this from an imposition script. It's
an applet to include PDF bookmarks by inserting data directly into the
PostScript stream, so is independent of whatever imposit script is 
being used. The difference here is that this is after the page(s) has 
been put on each sheet of paper, but maybe there's some imposition 
function I can use - I will look into it.

I'm guessing, a user specifies which pages to print and then there is an
index into that collection of pages (?) - you might have a 100 page
document and tell the program to print pages 10 to 15, six pages, index
0 to 5.

Yes, that's exactly the thing I'm after. Although, as opposed to just
the index 0 to 5, if there was a way to know that page as a Chapter 
and Page reference, such as 1.10, 1.11, 2.12, 2.13, 3.14 and 3.15, 
then I can use that to compare if there's one of my applet's (script) 
bookmarks on that page, so I know I can output the PDF data required.

Maybe there's a way to capture the print dialogue page range info when
the print button is clicked (or perhaps it's passed on to an 
imposition script). Although there's a multitude of ways the range can 
be entered, so I'd have to be able to decode that into a list of 
pages. I would still need to know when each page from the list is 
being printed so I can include the relevant data within that page's 
output.

For info:
The difficulty at the moment is that when printing out my larger book
projects I always print sections (or signatures) of a range of pages, 
so I can't include ALL the PDF bookmarks for every page of the book. I 
must only include the ones for the pages being printed. Any PDF 
bookmarks that link to pages that aren't in the document still appear 
in the PDF but the link is set to null - which jumps to the first 
page. This really causes havoc when the multiple sections are combined 
together to make a
PDF ebook version.

There is probably some trick - stick a macro into each page, kind of
thing.

Ooh, is that possible? If so then it's a new one on me. Are there any
examples of this trick - anyone?

Is there any possibility of these functions being added

Yes.

That would be fabulous if so.

To unsubscribe or subscribe goto: //www.freelists.org/list/davidpilling

Other related posts: