Topic Options
#19091 - 01/05/09 05:18 AM Page X of Y using scripting
Dev12345 Offline
Junior Member

Registered: 10/03/08
Posts: 1
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.


#19092 - 02/23/09 08:33 AM Re: Page X of Y using scripting
cosimo Offline
OL Expert

Registered: 10/31/01
Posts: 1286
Loc: montreal

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.