Network Printing

When printing in the network, keep the following two points in mind:

  Preview files are usually created in the same directory as the project file by the name of the project file and the extension "LL". If two users want to print the same file to preview, the second user receives an error message. This can be avoided by setting LlPreviewSetTempPath() (see example below).

  The same applies for printer settings files. These also will – with the currently selected extension – be searched for or created in the directory of the project file. LlSetPrinterDefaultsDir() should be used here. This setting is of particular importance if the available printers vary from workstation to workstation. That's one of the reasons why you shouldn't redistribute printer settings files to your users.

ListLabel LL = new ListLabel();
LL.DataSource = CreateDataSet();

 

// Set local temporary path

LL.Core.LlPreviewSetTempPath(Path.GetTempPath());

 

// Printer settings should be created in user-specific sub directory

// so changes will be stored permanently

LL.Core.LlSetPrinterDefaultsDir(<Path>);

 

LL.Print();

LL.Dispose();

Using the stream overloads of the Print and Design methods is an alternative here. These, for example, "automatically” take care of storing the printer settings in the passed stream. Hints as well as an example can be found in section Store Project Files in a Database.