selectPrintJob
The selectPrintJob method is a very powerful method that allows control of what to print. The simplest form deselects any existing jobs, or selects a single label, but it can also set up a database driven job. The job can either replace the existing job, or add it to a queue.
Parameter
A Print job object.
The Print job object must also include the following attributes:
| Key | Type | Description |
|---|---|---|
| printer | string | Printer ID. Required if more than one printer is available. |
Return value
null
Examples
Deselect all print jobs (clearing the queue):
selectPrintJob {}
Select a single label "MyLabel":
selectPrintJob {"labelName": "MyLabel"}
Select a single label "MyLabel", limit to a single print, and add to the end of the queue:
selectPrintJob {"labelName": "MyLabel", "copies": 1, "queue": true}
Search the table "MyTable" in the column "Product" for "MyProduct", and select the label from the column "Label":
selectPrintJob {"tableName": "MyTable", "keyColumn": "Product", "key": "MyProduct", "labelColumn": "Label"}
Print every row of the table "MyTable", using the label named in the column "Label", or "DefaultLabel" for rows where that column is empty v5.3.4:
selectPrintJob {"tableName": "MyTable", "labelColumn": "Label", "labelName": "DefaultLabel"}
Look up "Pallet1" in the column "Product" of the table "Pallets", and print the labels of the columns "Block1", "Block2" and "Block3" in turn, see Round robin v6.1:
selectPrintJob {"tableName": "Pallets", "keyColumn": "Product", "key": "Pallet1", "labelColumns": ["Block1", "Block2", "Block3"]}