Hi, I’m using Aspose Total version 22.10 and I’m creating a PDF from database fields that have html. How can I apply those html tags onto the PDF? I’ve got the following code snippet, but the Aspose.Pdf.Generator namespace is not found. Should I use older version? Please advise. Thanks!
[Csharp]
string s1 = “<font color=”#800080">This is a test for HTML " + “with colored text.”;
Aspose.Pdf.Generator.Text t1 = new Aspose.Pdf.Generator.Text(s1);
t1.IsHtmlTagSupported = true;
//Create rows in the table and then cells in the rows
Aspose.Pdf.Generator.Row row1 = tab1.Rows.Add();
row1.Cells.Add();
row1.Cells[0].Paragraphs.Add(t1);
Yes, Aspose.PDF does support HTML Tags. Please note that Aspose.Pdf.Generator is an old legacy approach that has been discontinued. You can use below approach and code in order to achieve similar functionality using DOM and 22.10 version of the API:
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.