Page X of Y using scripting

Posted by: Dev12345

Page X of Y using scripting - 01/05/09 05:18 AM

We have some clients that require a page count on each page of the output in the form 'Page X of Y'. I understand that this cannot be acheived within a Planet Press form as PP can only work forward through the data steam, so posts on the forums suggest using scripts in PP Watch instead.

I'm not familiar with any of the scripting languages that PP Watch supports (VBScript, Perl, Python, JavaScript and TCL?) though obviously I'm willing to learn. I've found some examples for Perl and VBScript scripts that open, read, edit etc and close the text file, does anyone have examples for the other languages?

As part of calculating the number of pages within a document I need to measure the width of a piece of text to see if it will overflow a line (the equivalent of the PPTalk function StringWidth). I've found MeasureString in JavaScript, does anyone know of any equivalents in the other languages?

We're currently using PP version 5.

Posted by: cosimo

Re: Page X of Y using scripting - 02/23/09 08:33 AM


What you want to achieve can be accomplished using Meta Data plug-in, available in V6. It too requires a VB Script to compliment the solution.
If you would like an example, simply contact support and we can provide you with a sample, however keep in mind that it is just an example , therefore it is not supported further.