This is the result with R3 2022:
This is the result with R2 2023 SP1:
Hello,
I want to share a possible workaround for this item. The issue happens because the field does not have a NormalAppearanceContent. You can manually set it like this:
var provider = new PdfFormatProvider();
//var document = provider.Import(File.ReadAllBytes(@"..\..\..\Systemvariablen.pdf"));
var document = provider.Import(File.ReadAllBytes(@"..\..\..\Simplified_TestForm1_cropped (1).pdf"));
foreach (var item in document.AcroForm.FormFields)
{
var widget = item.Widgets.First() as VariableContentWidget;
if (widget != null)
{
if (widget.Content.NormalContentSource == null)
{
widget.AppearanceCharacteristics.Background = new RgbColor(255, 0, 0);
widget.AppearanceCharacteristics.BorderColor = new RgbColor(0, 0, 255);
widget.Border = new AnnotationBorder(2, AnnotationBorderStyle.Solid, null);
widget.RecalculateContent();
}
}
}
pdfViewer.Document = document
I hope this helps. Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Hi, Joaquin,
Thank you for bringing this to our attention. We will do our best to introduce an appropriate solution as soon as we can.
Please excuse us for the inconvenience caused.
Regards,
Dess | Tech Support Engineer, Principal
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.