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

Free Support Forum - aspose.com

Text with 'IsHtmlTagSupported' and 'Margin' Property

Dear Sir or Madam,

If I create a Text element with option IsHtmlTagSupported and add a Margin, this Margin takes no effect.

Text titel = new Text("<fontsize=10>Table") { IsHtmlTagSupported = true };
titel.IsKeptWithNext = true;
titel.Margin.Bottom = 10;
Section.AddParagraph(titel);

If I leave option IsHtmlTagSupported it works as expected.

How can I set a Margin with IsHtmlTagSupported for a Text element?

Thanks for support!

Hi,


Thanks
for using our API’s.<o:p></o:p>

I
have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this problem as PDFNEWNET-36381 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.

The issues you have found earlier (filed as PDFNEWNET-36381) have been fixed in Aspose.Pdf for .NET 9.5.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

Hi there,


Thanks for your patience. We have fixed your reported issue in new DOM approach. Please check following code snippet for the purpose.

string outFile = “36381.pdf”;<o:p></o:p>

Document doc = new Document();

Page page = doc.Pages.Add();

HtmlFragment titel = new HtmlFragment("Table");

titel.IsKeptWithNext = true;

titel.Margin.Bottom = 10;

titel.Margin.Top = 200;

page.Paragraphs.Add(titel);

doc.Save(outFile);

Please feel free to contact us for any further assistance.


Best Regards,