[@] Page bookmarks

Navigation:  vpxPrint tags > Special tags >

[@] Page bookmarks

Previous pageReturn to chapter overviewNext page

 

Page bookmarks can be used to build summary or table of contents.

 

How to define a PAGE BOOKMARK ?

[@name]

 

Sets a page bookmark anywhere in the report.

The page bookmark refers to a page number.

Note that the syntax is different from the standard < xxxxxx > vpxPrint tags. This tag is not a normal tag, it's a preprocessed tag.

 

You can refer to these bookmarks by :

         [=@name]

 

         If no name is provided, the current page number is returned.

 

Important: you can use the bookmarks before they are defined in the report. This allows the building of a table of contents at the beginning of the report.

 

How it works ?

From a technical point of view, vpxPrint evaluates the page bookmarks in a first pass, before processing the file content.

      That means that you may use and/or embed the page bookmarks in any vpxPrint syntax. An example is provided in the xDict.w program file.

A Table of contents with sensitive buttons and areas is in the first page. Clicking of a button changes the current page to the one containing the page bookmark.

 

 

Arithmetic operations :

Page bookmarks can also be used to display information like "Page 1 / 3" in a report containing more than one section.

 

To achieve this, vpxPrint allows basic arithmetic operations, addition and subtraction.

 

Syntax :

 

                 [=@name   [ + | - ]   [ @name2  | int-value ] [ + | - ]  [ @name3  | int-value ] ......]

 

Examples :

         [=@endPage-@startPage+1]

 

         <VIEWPAGE=[=@GrandTotal]>

         ... and put [@GrandTotal] on the page where you want the preview displayed.

                                         

Tip:

Set a first bookmark in the first page of the invoice 123 (example). [@startPage123]

and put a page bookmark in the grand total page [@endPage123].

 

Use then page footer or header with

         "Page " myPageNumber " /        [=@endPage123-@startPage123+1]"

                                         

Note that a bookmark name is unique. The last value is always used.

 

Note:

The tag can be escaped with the \ character.

Ex:                \[@page]