Is there a method to adjust length?
In svg there is a way to fit text into width
<text textLength="75" lengthAdjust="spacing">This is a shrunked text</text>
I know of the maxWidth property but is there something like lengthAdjust.
Here is more info about the svg lenghtAdjust Property https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/lengthAdjust
Hello @kamranmuazzam! I'm afraid there is currently no such API available in pdf-lib. However, all of the primitives that would be necessary to develop one exist (specifically, the ability to measure text dimensions in a given font and adjust the size when drawing text). If anybody would like to submit a PR implementing this feature, I'd be willing to merge it.