AddText in pptxgenjs flexible width issue

937 Views Asked by At

I am trying to achieve a result like this

enter image description here

But the width of text automatically takes way more space than expected.

enter image description here

The text behavior is like div but I want it to behave like span How to achieve something like this in pptxgenjs.

1

There are 1 best solutions below

0
On

I got an answer officially from the owner of repo which I want to share here.

Hi @the-yadu ,

Yeah, this gets asked periodically, but there's no fix per se. Objects have to have a specified width - even ones with an auto-size property set - and there's no way for the code to know how wide "RalphLauren" is.

Best I can tell, PowerPoint does this type of thing in the app itself, not in the generated XML, so I'm unable to mimic it.