My current project involves converting HTML to PDF using jsPDF. In order to ensure that every word appears in the exact location as it does in the original HTML, I decided to wrap each word in <span>
tags. Specifically, I have a font
tag (not added by my code) that contains several nested span
elements:
<font><span>Hello</span> <span>wrap</span> <span>....</font>
Despite these efforts, after implementing this strategy, I noticed that it seems to disrupt the default word wrapping behavior, as demonstrated here.
I am seeking advice on how to rectify this issue and restore the desired word wrapping functionality. Can anyone provide guidance on how to achieve this?