Hello,
i'm trying to change the Background-Color from the PDF i generate.
I need to use HEX Values, not the Syncfusion.Drawing Colors.
I'm trying to use the ColorTranslator.Fromhtml:
Data from Syncfusion.Drawing.ColorTranslator.FromHtml("#000000"):
With FromHtml(Hex) the Background is still white.
----------------------------------
This is working:
Data from Syncfusion.Drawing.Color.DodgerBlue:
With DodgerBlue the PDF Background is Blue and works.
What can i do to use Hex values for the PDF Background?
(I'm using the Webkit Engine)
Thanks for help,
Nils
Hi Gowthamraj,
thanks for the Information.
please consider: i created the topic in topic ASP.NET MVC - EJ 2, but I'm using blazor (the update need to be done in blazor) :)
thanks for you help
Nils
Hello,
so there is no way to take the color out of the colorpicker?
<SfColorPicker Mode="ColorPickerMode.Palette" ShowButtons="false" ModeSwitcher="false" ValueChange="@ColorPicked"></SfColorPicker>
And use it as PDF Background? :/
that would be very annoying. is there an alternative? or do you have another idea?
Regards,
Nils
I've built my own color-picker with the drawing.colors now, so this topic is solved.
unfortunately the colors are not as nice and flexible as the ones from the hex-palette and the hex-picker is unusable. it would be nice if the translation from hex to syncfusion.color is integrated sometime in the future.
thanks for your assist
Nils
Syncfusion.Drawing.Color color = Syncfusion.Drawing.ColorTranslator.FromHtml("#1e90ff");
foreach (string name in Enum.GetNames(typeof(System.Drawing.KnownColor)))
{
if (color.ToArgb() == Syncfusion.Drawing.Color.FromName(name).ToArgb())
{
Console.WriteLine(name);
settings.BackgroundColor = Syncfusion.Drawing.Color.FromName(name);
break;
}
} |