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

Free Support Forum - aspose.com

Span with background-color attribute exceed the document boundary

I have a problem with a Aspose.Pdf.Generator.Text containing html span with a background-color attribute. I’ve set the IsHtmlTagSupported to true;

This span doesn’t work :

span style=“background-color:#AFEEEE



This one works :



span style=“font-family:courier new,courier,monospace”



I’m using the 9.5 version of Aspose.PDF



Is this a bug or i’m doing something wrong?

Hi Zied,


Thanks for your inquiry. Please use DOM approach to add HTML text in PDF, it is more improved and efficient. Please check following documentation link for the purpose.


Please feel free to contact us for any further assistance.

Best Regards,


Hi Tilal,



changing all my code to the Aspose.Pdf namespace is not a solution for me. this will be a huge work for my little bug, can you fix this problem in the Aspose.Pdf.Generator namespace?



Regards

Hi Zied,


Aspose.Pdf.Generator is legacy approach and all the new enhancements/bug fixes are being introduced in new Document Object Model of Aspose.Pdf namespace. I am afraid we might not be able to fix issues in legacy approach. Therefore we recommend you to please try migrating to new approach and in case you still face the same issue, please feel free to contact.

We are sorry for this inconvenience.