Default padding for htmlfragment

Hi,


I am trying to insert html fragment in a table. It seems HtmlFragment element is adding default top padding to the contents. I am trying to remove the padding. But it is not working.
Can you please look into this.

I tried all the following options:

HtmlFragment fgmt = new HtmlFragment("<div style=“background-color:red;padding-top:0;”>test
");

HtmlFragment fgmt = new HtmlFragment("<span style=“padding-top:1pt;background-color:red;”>test");

HtmlFragment fgmt = new HtmlFragment("<p style=“padding-top:1pt;background-color:red;”>test");

HtmlFragment fgmt = new HtmlFragment("<p style=“padding-top:1px;background-color:red;”>test");

Thanks
Mamatha


Hi Mamatha,

Thanks for your inquiry. I have tested your scenario with shared document using Aspose.Pdf for Java 11.6.0 and managed to observe the reported padding issue. For further investigation, I have logged an issue in our issue tracking system as PDFJAVA-35970 and also linked your request to it. We will keep you updated via this thread regarding the issue status.

We are sorry for the inconvenience caused.