HTML tag font-color doesn't work with pdf export

Stimulsoft Reports.WEB discussion
Post Reply
rafael_at
Posts: 5
Joined: Sun May 03, 2020 9:40 am

HTML tag font-color doesn't work with pdf export

Post by rafael_at »

Hi,
I'm trying to change the color of a text component dynamically: the color comes from the data source (every row has a different color, defined as hex-string).
So I tried different approaches, nothing works on .Net Core, but on .Net Framework it works all:
- BeginRender event:

Code: Select all

Stimulsoft.Base.Drawing.StiSolidBrush b = new Stimulsoft.Base.Drawing.StiSolidBrush(System.Drawing.ColorTranslator.FromHtml(positions.cat_color));
Text8.TextBrush = b;
- font color HTML tag:

Code: Select all

<font color="{positions.cat_color}">
{positions.cat_name}
</font>
So please advice how I can solve this problem! I would even prefer to use Reports.JS, but I think it has the same (or even more) limitations than .Net Core.

(btw, I'm currently evaluating your product, as we currently use SSRS. Since we want to move to AWS Lambda, we have to use a reporting solution which works with either Node.JS or .Net Core on Linux). So Stimulsoft looked like a good fit. However, in SSRS we are used to be able to use expressions in basically all properties. So it offers a very high degree of complex reports. Your product on .Net Framework seems to offer the same high degree of customisation by using events. But as mentioned above, your product doesn't offer events on JS or .Net Core, and it doesn't offer expressions for all properties (like Text Color). So I am a bit hesitating how we could make the switch to your product, if we can't solve this rather simple problem of changing the text color dynamically. I would really appreciate your help here.

thanks,
Rafael
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: HTML tag font-color doesn't work with pdf export

Post by Lech Kulikowski »

Hello,

> - BeginRender event:

In the NET Core version, only Interpretation mode is available, the compilation is not supported. In that mode, events are not available.

> - font color HTML tag:

Font color is not supported in the NetCore version.
In the Net engine uses system Windows libraries.
It is not possible to use it in the NetCore. We are adding it to our engine, but not all at that moment.

Thank you.
Post Reply