Token Engine

MadeToPrint provides a powerful token engine that helps to define rules to generate file names, target directories – and a variety of status information for the job slug (infobar) dynamically.

The tokens are accessible via pulldown menus under file name; infobar and other functionality areas of MadeToPrint. A description of each variable can be found in the token help.

Rule-based Queries (Ask Token)

With the help of so-called ASK-Tokens, it is possible to create queries, for example, to enable users to enter marks that will appear on the Infobar while executing a print job. The ASK token follows this syntax:

«ASK( "Prompt", "Scope", "Format", "Error" )»

The text entered underneath “Prompt” will be displayed as enter prompt in dialog window while executing a print job. The details under “Scope”, “Format”, and “Error” are optional and have the following meaning:

The Area "Scope"

"Scope" defines the time of the query. Values possible for “Scope” are “Job”, “Session” and “Page”.

"Job" – this query appears while executing a print job. This is a default setting and does not need to be given (entered).

"Session" – this query appears during each XPress session, i.e., you only need to enter your input after XPress has been restarted.

"Page" – this query appears on each page of the document to be output.

The Area "Format"

"Format" is used to define, with the help of regular expressions, rules (conditions) for the input, for example,

"\\w" limits the input to alphanumeric values

"\\d" limits the input to numerical values

"\\d{6}" limits the input to a 6-digit number

The Area "Error"

If the rule defined in “Format” does not match this, the following default error message will appear: This entry is not allowed in the job settings. It is possible to individually adapt this preset error message by entering an entry in “Error”.


The plain token «ASK(„Enter your name:“)» displays a dialog every time a print job is being executed. The entry is not limited, i.e., the user may enter any amount of characters in the query dialog.

The advanced token «ASK(“Date of publication [DDMMJJ]:“,“Job“,“\\d{6}“,“Error, enter a date!“)» causes a query dialog to appear each time a print job is being executed.

The entry is limited to six numerical values. Whenever the entry is incorrect, the message „Error, enter a date!“ will appear.

Modifying the token in the area “Format“ will check the validation of the entered numerals while being entered.

«ASK(„Date of publication [DDMMJJ]:“,“Job“,“([12][0-9]|3[01]|0[1-9])(0[1-9]|1[012])([0-9][0-9])“,“Error, enter a date!“)»

The regular expression “([12][0-9]|3[01]|0[1-9])(0[1-9]|1[012])([0-9][0-9])“ describes the rules to enter day (01 to max. 31), month and year.

([12][0-9]|3[01]|0[1-9]) describes the day (01 to max. 31) and allows only the numeral 1 or 2 in the first position, followed by the numerals 0 to 9. If the first numeral is 3, it shall only be followed by 0 or 1. If the first numeral is 0, then only numerals from 1 to 9 may follow.

These rules are also defined for the month and year.

Page Numbers in File Names

The token «PAGENUMBER( )« inserts the current page number, for example, into the file name. The token «PAGELABEL( )» may also be used here, however, instead of the total page numbers, the page marks will be used – defined in the section options of QuarkXPress. In connection with the token «DOCUMENTNAME()», it is possible, for example, to define the following name conventions for the PostScript output:


The outcome would be PDF files named





It is possible to create a three digit page number (beginning with zero) with the following token combination


The token «RIGHT(00&PAGENUMBER(), 3 )» calculates from a string of text the defined amount of characters, in this case, beginning on the right. The string of text consists of double zero „00“ and the respective page number. The result would be





If you have questions or if you need help regarding MadeToPrint, please contact: [email protected]