Html to Pdf - negative margin-top ignored for paragraph


I am converting html to pdf as well as docx. The problem I have is that the hang indent created in the content is done as below:


Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,

This renders looking like a bullet list with the second paragraph inline with the first but having it’s own left indent. Please see attached screenshot of html page.

But when I push this through Aspose to render it creates each paragraph on a new line.

1. Please can you confirm that Aspose does not allow negative top margins.
2. If so do you have any suggestion of how I can structure my html differently to get the same outcome in html and after it gets converted to pdf.

Note: The html is shown to our users on a site as well.

Below is example of conversion from html to pdf

Hi Johan,

Thanks for your inquiry. Could you please attach your input Html here for testing? We will investigate the issue on our side and provide you more information.


Please find the file attached. I had to upload as txt file as validation was not happy with .html

Hi Johan,

Thanks for sharing the document. Please note that Aspose.Words mimics the same behavior as MS Word does. If you open the html in MS Word and save it to pdf, you will get the same output.

Please let us know if you have any more queries.