We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Line-height not working in HTML-PDF conversion

Hi,

I am not able to get the line-height to work on HTML->PDF conversion for version 22.8.0.

The HTML is very simple and looks like this: (note I used brackets due to html scrubbing)

<span style="line-height:50pt;">How to investigate and handle a customer complaint of payment not applied to account.&nbsp;<br>This best practice includes tried and true techniques including troubleshooting tips. testwewqeqetest change1</span>

It renders correctly in the browser, but when in PDF it does not show any spacing.

Thanks for your help!
John Lewis

@shmeep line-height attribute in HTML corresponds to paragraph line spacing in MS Word document. In your HTML snippet, however, you specify this attribute in <span> tag, which corresponds Run node in MS Word document. If you open your HTML in MS Word line-height attribute specified in <span> tag will also be ignored.
To get the desired output, you should specify line-height attribute in <p> tag, like shown in the following HTML:

<html>
<body>
    <p style="line-height:50pt;">How to investigate and handle a customer complaint of payment not applied to account.&nbsp;<br>This best practice includes tried and true techniques including troubleshooting tips. testwewqeqetest change1</p>
</body>
</html>