Is it possible to do a the digital signature directly while creating the invoice?

No, it’s not possible to apply a digital signature directly while creating the invoice.