You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It only adds an additional blank line because you put a blank line, like that:
<p>This is an example paragraph</p><!-- the blank line is here -->
But I suppose your case is more complex than that? You can try the removeExtraBlanks, and you can remove the end blank space at the end of your HTML string:
htmlToPdfmake(`<p>This is an example paragraph</p> `.replace(/\s+$/,''),{removeExtraBlanks:true})
Hello,
If you have a paragraph in html, html-to-pdfmake adds a blank line ({ "text": " "}) below it.
Example:
HTML
<p>This is an example paragraph</p>
PDFMAKE
var dd = { "content": [ { "text": " This is an example paragraph. ", "nodeName": "P", "margin": [ 0, 5, 0, 10 ], "style": [ "html-p" ] }, { "text": " " } ], "styles": {} }
Is there any way to switch off this behavior?
With this option I think would be easier to control the spacing between paragraphs.
Thanks in advance.
The text was updated successfully, but these errors were encountered: