PDF Script Example

In this scripting example the script for a PDF presentation that starts automatically is explained.


A start and end page can be defined for the PDF presentation, between which the presentation runs. Two variables StartPage and EndPage are created as data sources in which the respective page numbers can be entered.

The script for the presentation is then very simple:

if screens['Screen1'] >= data.EndPage then
	screens['Screen1'] = data.StartPage
	screens['Screen1'] = screens['Screen1'] + 1

screens['Screen1'].Page.text = screens['Screen1'] .. ' /  ' .. screens['Screen1'].PDFViewer.pagecount

First, the system checks whether the end page has already been reached. If this is the case, the presentation automatically jumps to the previously defined start page. If this is not the case, a page is added to the current page. Finally, the current page is written into a text field. The current page number is determined via screens['Screen1'] and then the total page number is displayed in connection with a backslash screens['Screen1'].PDFViewer.pagecount.

This example can be found in the Peakboard Designer under Templates -> Scripting, or can be downloaded via this Link.