CharacterFormat in Hyperlink

Hi,

Is there a way to change the CharacterFormat of a Hyperlink ?
In the documentation it’s written that we can, like Run or Field, but the property isn’t accessible on Hyperlink.

I tried to create a Field with FieldType.Hyperlink, wich allows me to access to CharacterFormat, but then I don’t find how to change the value of the Field’s Hyperlink.

Thanks for your help !

Hi,

You can create a Run element and provide it to the Hyperlink as its display inline.
For example, try this:

var hyperlink = new Hyperlink(document, "https://www.gemboxsoftware.com/",
    new Run(document, "GemBox") { CharacterFormat = { FontColor = Color.Red } });

Does it solve your issue?

Regards,
Mario

Yes, perfect !

Thanks Mario