[Solved] How to add printing invoice to cups in SendRecurringInvoiceByMail Module

I try to make my first changes to Dolibarr with adding auto print the invoice to a cups printer while running SendRecurringInvoiceByMail Module.

I found already the place in the module where to put the code, enabled Syslog to see whats going on and place my code with some syslog entries to see whats going on. The direct printing module is activated and printing via clicking on the print button of a invoice prints it correct.

Now I am looking for how to call the printing of the invoice in the SendRecurringInvoiceByMail Module at the place where i want to put the code. Syslog at this place says checking for standard printer is ok, filename is the one i want.

Any hint how to call printing function to print this file to printipp/cups there would be greatly appreciated.

Thank you very much.

I solved it and can now enable/disable auto print in Admin Settings. My changes works with IPP only for now. Will make it available in my git repo as soon as there is time.