Starting Print: Reading the Project File

Before the print can be started, it is important to know which project is to be loaded and which variables are to be made available.

After the optional dialog where the user can choose the project file, LlSelectFileDlgTitleEx(), all variables which are to be included in this project must be defined. If List & Label evaluates an expression in which there is an unknown variable, then it ends the loading process and passes back the corresponding error code. The definition of variables is programmed in the same way as the definitions before calling the Designer.

In the case of a list project (LL_PROJECT_LIST), the corresponding fields must also be defined in order to avoid an error.

Once you have called

LlPrintWithBoxStart(hJob, LL_PROJECT_LABEL, aczProjectFile, LL_PRINT_NORMAL,
                LL_BOXTYPE_BRIDGEMETER, hWindow, "my test");

and no error is returned from this function, List & Label has read the definition of the project and is ready to print. The printer is, however, not initialized yet - this is done with the first function call which starts the printing job.

If you want to allow the user to change the print parameters, the corresponding dialog is called using:

LlPrintOptionsDialog(hJob, hWindow, "Print Parameter");

With LlSetOption() and LlSetOptionString() standard values for that particular printout can be given, for example

LlPrintSetOption(hJob, LL_OPTION_COPIES, LL_COPIES_HIDE);

suppresses the "copies" query in the print options dialog.

If "Save options permanently" has been checked in the dialog then the chosen printer setting is saved in a so-called "printer definition file". Initially, the printer and layout is determined in the Designer (menu: Project > Page Layout). If this file is not found, then the Windows standard printer is used. Further information on this can be found in chapter List & Label Files.