Quite Hot 6: Variables

Previous: << Variables: using variables with Enfocus Switch
Next: >> Variables: Expressions

Variables: command line options

This section describes all the command line options for Quite Hot Imposing that are related to variables, and may duplicate information in other sections.

Setting variables

Individual variables are set with the ‑v:name option

-v:rowcount 3

-v:caption "March edition"

The -v option can only give a variable’s full value, not an expression. All values are strings, but strings that contain only digits are valid as numbers.

Variables can also be set using a variable file

-vars filename  or
-vars:type:format filename 

Means that the file is to be read as a list of variables.

Two formats are available

·         A text file. This can be specified with -vars:text:simple, but it is also the default when -vars is used. See “Variables setting files” for the format.

·         An XML file with a specific set of tags which is based on the Enfocus “fields” format of XML, but which can be easily generated from other apps. This is specified by -vars:xml:fields. This is also described in “Variables setting files”.

Working with Enfocus Switch there is an additional feature

-vars dataset::datasetname or
-vars:type:format dataset::datasetname

Will read the variables file from a Switch dataset. A further shortcut for Switch is

-switchfields "list of datasets"

This takes a list of datasets separated by whitespace or commas, and for each of them is equivalent to  using -vars:xml:fields dataset::datasetname

These options can be repeated. The last value specified for a given variable name is the one used. You should not rely on the order in which single variables and variable filenames are set if you mix them.

Using filters to set variables

As described in the main Quite Imposing manual, filters can be used to look at file names and pull variables from them. This happens automatically when using filters in watched folders. There are many other ways to set variables by command line, but you can also use filters, so that file names, controlled directly by the end user, can set variables.

-varfilter "filterstring"

Is used to specify a filter. It is important to realize that this does not in any way limit the files that are accepted. If you have got as far as running the command line, the file will be used. But a filter can be used to scan the file names that you have, and pull out variables. The syntax is exactly the same as with watched folders, for example  -varfilter "BOOKLET-<copies>,<title>".

You can use multiple -varfilter parameters. They are all processed, and variables are set if, and only if, the filename matches the pattern. If more than one filter sets the same variable, the last one is used. The filename here is the primary file – typically a single PDF, but possibly the name of a directory. The name can be overridden with -jobname name. Filters always match names ending .pdf, so there is no need to include this in the filter.

Legacy feature – user variables

You can also continue to use the -User:name command line option, which was present in version 5.0, for setting user variables. This is exactly the same as -v:name.

User variables have been largely replaced by the new variables in 6.0, but you can still use the old notation. For example, you can use [User:rowcount] in a string of text to stick on a page. User variables can use numbers as names. This was the basis of “User parameter 1” etc in Enfocus Switch. User variables can be referenced as [User:name] in an expression.

Specifying variables to export

Any variable might be exported. Quite Hot Imposing keeps a list of the names to export.

-varexport name  can be used to add names to the export list, repeated as often as needed. This name can use a different mixture of upper and lower case than the original name. For example if you set a variable MyLabel, you can say -varexport MYLABEL, and MYLABEL is the name used in the export, but the value is still the value of MyLabel.

-varexport "*" (asterisk) asks for all variables to be exported. The original case of the variable name is preserved. For example if a variable is first referred to as NumRows that name will be used in the export, even if it is later called NUMROWS or numrows.

Specifying how variables are exported

Variables can be exported to a file, or written to the standard error stream.

-exportvars filename specifies an output file. The file is written in the same text format expected for input -vars files. Exporting happens at the end of the job.

-exportvars:type:format filename can be used to choose other formats. -exportvars:xml:fields produces the XML fields format described in “Variables settings files”, and can be read using -vars:xml:fields.

-exportmarker "string" to direct exports to output file stderr. Each line is prefixed with " string”. This mechanism is used internally by Enfocus Switch and must not be set in the command lien in this case.


Previous: << Variables: using variables with Enfocus Switch
Next: >> Variables: Expressions