combit List & Label 29 - .NET Help
combit.Reporting Namespace / ListLabel Class / DefinePrintOptions Event


In This Topic
    DefinePrintOptions Event
    In This Topic

    This event can be used to set additional options to be used for print/export.

    Internally, the event is triggered after the print/export process is started; but before the actual printing starts. This allows you to define various export options using the ExportOptions property or set special print options using LlPrintSetOption and LlPrintOption.

    Syntax
    'Declaration
     
    
    Public Event DefinePrintOptions As DefinePrintOptionsHandler
    public event DefinePrintOptionsHandler DefinePrintOptions
    public:
    event DefinePrintOptionsHandler^ DefinePrintOptions
    Example

    If the number of copies is to be defined for label printing, this can be done with LlPrintOption.Copies.

    ...
    // Define label as project type
    LL.AutoProjectType = LlProject.Label;
    
    // Register event for defining additional print options
    LL.DefinePrintOptions += LL_DefinePrintOptions;
    
    // Print
    LL.Print();
    ...
    
    private static void LL_DefinePrintOptions(object sender, EventArgs e)
    {
        // Get the calling List & Label object
        ListLabel senderLL = sender as ListLabel;
    
        // Define amount of hardware copies
        senderLL.Core.LlPrintSetOption(LlPrintOption.Copies, 2 /* amount of copies */);
    }
    
                    
    ...
    ' Define label as project type
    LL.AutoProjectType = LlProject.Label
    
    'Register event for defining additional print options
    AddHandler LL.DefinePrintOptions, AddressOf LL_DefinePrintOptions
    
    ' Print
    LL.Print()
    
    ...
    
    Sub LL_DefinePrintOptions(sender As Object, e As EventArgs) Handles LL.DefinePrintOptions
    
        ' Get the calling List & Label object
        Dim senderLL As ListLabel = TryCast(sender, ListLabel)
       
        ' Define amount of hardware copies
        senderLL.Core.LlPrintSetOption(LlPrintOption.Copies, 2)
    
    End Sub
    

     

    Requirements

    Platforms: Windows 10 (Version 21H2 - 23H2), Windows 11 (21H2 - 22H2), Windows Server 2016 - 2022
    .NET: .NET Framework 4.8, .NET 6, .NET 7, .NET 8

    See Also