I want to add a line in the receipt when printing. I'm trying with the OnBeforePrintLoyalty function.  But when I print, nothing changes. Can someone help me with an example to customize receipts on dynamic 365?
Regards
 
About vesion: 
Microsoft_Base Application_24.1.18927.19498
LS Retail_LS Central_24.1.21.1157
 
 
    [EventSubscriber(ObjectType::Codeunit, Codeunit::"LSC POS Print Utility", 'OnBeforePrintLoyalty', '', true, true)]
    local procedure OnBeforePrintLoyalty(var Transaction: Record "LSC Transaction Header"; var PrintBuffer: Record "LSC POS Print Buffer"; var PrintBufferIndex: Integer; var LinesPrinted: Integer; var DSTR1: Text[100]; var IsHandled: Boolean)
    var
        cuPT: Codeunit "LSC POS Transaction";
        POSFunctions: Codeunit "LSC POS Functions";
        i: Integer;
        PadText: Text;
    begin
        POSPrintUtilityCus.GetPrintBufferRec(PrintBuffer, PrintBufferIndex, LinesPrinted);
        POSPrintUtilityCus.PrintLine(2, 'Test Line');
    end;