How to adjust string size based on length

Hi all, Currently i'm trying to create a contract for a customer in a document template where the name of the person is already filled in dynamically. (see image below)   However, this is currently not ideal, since when the name is too long, the surname overlaps with the static text. (And also when the Surname is too short, there is a huge gap between the sentence. Is there a smart way to fix this problem? The most obvious solution for me is to adjust the string size based on the legth. But i don't know how this is doable. Thanks in advance.  
1 answers

Could you build a single String in a microflow that joins these values. You could then just use this single string in your template which should help solve your spacing problem.