Skip to content
Advertisement

How to use setHtmlVSpace in TCPDF to reduce vertical space between list elements?

My pdf document currently looks like this. enter image description here

I want to reduce the space between the li elements. I was trying to use inline style for the li tags, and after many unsuccesful attempts I found this answer

JavaScript

This is my code right now, but still the spacing is not changing.

Advertisement

Answer

EDIT: the CSS property for margin and padding is not supported in TCPDF. Instead I added line-height in my span tag to obtain desired spacing.

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement