KeyNotFoundException in DefaultAppearanceProvider.TryGetCurrentAnnotationAppearances when loading PDF with FreeText/Widget annotation containing invalid "/AP << /N 0 0 R >>" reference (likely macOS Preview-authored)
Loading a PDF containing an annotation with a broken appearance reference (/AP << /N 0 0 R >> — an indirect reference to object 0, which is reserved/invalid per the PDF spec) throws an unhandled KeyNotFoundException deep inside the rendering pipeline when the affected page is scrolled into view. This crashes the hosting WPF application, since the exception originates inside WPF's layout/render callback (OnRender) rather than during the initial PdfFormatProvider.Import() call, so it cannot be caught by application-level try/catch around import.
I found this appears to match a previously reported and fixed issue: "PdfViewer: KeyNotFoundException is thrown when loading a document with Free Text Annotation," fixed in Release 2024.3.924. I'd like confirmation this is the same root cause and whether 2024.3.924+ resolves it, or if this is a distinct case given the specific /N 0 0 R malformation I've isolated.
RadPdfViewer via PdfFormatProvider.Import() with ImportSettings = PdfImportSettings.ReadOnDemand.RadFixedDocument to RadPdfViewer.Document.System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Telerik.Windows.Documents.Fixed.Model.Annotations.MultiStateAppearances.get_Item(String stateName)
at Telerik.Windows.Documents.Fixed.Utilities.Rendering.Annotations.DefaultAppearanceProvider.TryGetCurrentAnnotationAppearances(Annotation annotation, SingleStateAppearances& singleStateAppearances)
at Telerik.Windows.Documents.Fixed.Utilities.Rendering.Annotations.DefaultAppearanceProvider.TryProvideAppearanceOverride(Annotation annotation, AnnotationAppearanceMode annotationAppearanceMode, FormSource& formSource)
at Telerik.Windows.Documents.Fixed.Utilities.Rendering.Annotations.BaseAppearanceProvider.TryProvideAppearance(Annotation annotation, AnnotationAppearanceMode annotationAppearanceMode, FormSource& appearance)
at Telerik.Windows.Documents.Fixed.Utilities.Rendering.Annotations.BaseAppearanceProvider.TryProvideAppearance(Annotation annotation, AnnotationAppearanceMode annotationAppearanceMode, FormSource& appearance)
at Telerik.Windows.Documents.Fixed.Utilities.Rendering.FixedPageContentRenderingHelper.RenderNormalAnnotationAppearance(IFixedContentRenderer renderer, Annotation annotation)
at Telerik.Windows.Documents.Fixed.UI.AnnotationAppearancesCanvas.DrawAppearance(DrawingContext drawingContext)
at Telerik.Windows.Documents.Fixed.UI.AnnotationAppearancesCanvas.OnRender(DrawingContext dc)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.Controls.Canvas.ArrangeOverride(Size arrangeSize)
at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect)
at System.Windows.UIElement.Arrange(Rect finalRect)
at System.Windows.ContextLayoutManager.UpdateLayout()
at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)The offending annotation object in the PDF:
181 0 obj
<< /AP << /N 0 0 R >>
/M (D:20231128120931Z00'00')
/Rect [ 67.664 412.788 527.774 446.2222 ]
/AAPL:SFF true
/F 4
/DA (//Menlo-Regular 14 Tf 0 g)
/AAPL:AKExtras
<< /AAPL:AKPDFAnnotationDictionary
<< /AP << /N 0 0 R >>
.../AP << /N 0 0 R >> is an indirect reference to object number 0, which is reserved by the PDF spec (head of the free-object list) and never resolves to a real object./AAPL:SFF, /AAPL:AKExtras, /AAPL:AKPDFAnnotationDictionary keys indicate this annotation was written by macOS Preview.app (Apple's proprietary annotation/markup extensions), consistent with a document that was signed or markup-annotated on a Mac before being distributed.DefaultAppearanceProvider.TryGetCurrentAnnotationAppearances does: singleStateAppearances = appearances[appearances.CurrentState];with no existence/null check before indexing — when CurrentState doesn't resolve to a valid key (because the backing /N reference was never a valid object), this throws KeyNotFoundException uncaught.
This exception occurs during WPF's internal render callback, outside the call stack of the code that calls PdfFormatProvider.Import(), so it cannot be caught by a standard try/catch around import/load. It surfaces as a DispatcherUnhandledException on the UI thread and, without an application-level workaround, crashes the hosting application entirely.
/N 0 0 R invalid-reference pattern?/N 0 0 R malformation, not just the FreeText-annotation case?Appearances/MultiStateAppearances members, which is fragile across versions.)TryGetCurrentAnnotationAppearances already has "Try" in its name implying safe failure, could this be hardened with a TryGetValue instead of the indexer, to fail gracefully rather than throw, for any similarly malformed future document?1. Create clean WinForms .NET Framework project.
2. Add Telerik UI for WinForms 2026.2.520.462.
3. Create BaseForm : RadForm.
4. Add RadStatusStrip to BaseForm.
5. Create inherited form RadForm1 : BaseForm.
6. Open inherited form in Visual Studio designer.
7. Designer crashes with NullReferenceException in Telerik.WinControls.UI.Design.RadControlDesigner.OnSetCursor.
8. Remove/comment RadStatusStrip from BaseForm.Designer.cs.
9. Designer opens successfully.
Sample project attached.
In this particular scenario, we have 2 monitors. One with 100 % and one with 150% DPI. When the ScreenTip is shown in 100%, its size is correct. Then if we move the Form to the second monitor that is 150%, the screenTip size is not scaled when shown for the first time. We need to move the mouse to hide and show it again. The second time, the size is correct.
Clients with perpetual license may observe the following warning when using UI.for.WinForms.AllControls.Net90 (v.2026.1.415):
Telerik and Kendo UI Licensing warning TKL403: Services associated with Telerik Document Processing Libraries version 2026.1.402.80 require a subscription or trial license. Please obtain a subscription license at https://prgress.co/3PwQMKZ
Telerik and Kendo UI Licensing warning TKL004: Unable to locate licenses for all products.
Hi support,
I think I found an issue with the default behavior of Telerik UI for Winforms on a HighDPI PerMonitorV2 configuration.
The application works correctly and resizes well if moved between screen with different Font Scalings.
However, if the user changes the main screen to one with a different scaling, the application is strangely taking the change into account and would also not come back to its original state.
Attached is a GIF showing the problem and the project. The application on run on screen 3 being main display at 100% FontScale. If I pass Screen 1, the main display (which is 125% font scaled), the icons of the app are made larger (for no reason), going back to screen 1 being the main screen, will not restore the icon to the correct size, unless you make parts of the application being redrawn.
I've a more related question but it's more complex and I won't be able to provide a project for this, so I'm just trying here ;) In our real application (not this test one), when setting PerMonitorV2 mode, we need to have RadControl.EnableRadAutoScale set to false for the controls to resize correctly when changing monitors whereas this [test] application needs it to be let it set to true to kind of do the same thing ?! Any idea on where the difference can come from ?
Thanks & regards,
Benjamin Foucher
The content is exported correctly, but the following error occurs:
team,
we did not get any help from public forum,
already we commited our stack holders will resolve in 2026 Q1, so please close ASAP.
team,
we did not get any help from public forum,
already we commited our stack holders will resolve in 2026 Q1, so please close ASAP.
RadFileDialogs: Selecting Large Number of Files is Very Slow
Team,
we did not get any help from public forum,
we are expecting in 2026 Q1,
RadControl: Incorrect Font scaling after DPI switch runtime
Team,
we did not get any help from public forums,
we are expecting in 2026Q1,
so please handle it, https://feedback.telerik.com/winforms/1700973-radfiledialogs-selecting-large-number-of-files-is-very-slow
There is a big problem with Telerik controls when using national resource files. Switching from one language to another and again sometimes destroys the user interface. It especially concerns RadCheckBox control. Text, tooltip and probably other properties from one control appear in other control etc. I think it can be a general problem because I also noticed that sometimes Image from one RadButton control appears in other button.
I prepared a set of images which show how it happended in my case. Switching from Default language to Polish language and again and then adding and removing new RadCheckBox completly destroyed user interface in my sample UserControl. This new RadCheckbox was created as a copy of existing RadCheckBox what may be a clue.
I also attached VS2019 project with my sample UserControl.
Best regards,
Andrzej
(This request may be specific to VS solutions which produce only DLLs, and not to ones which create a .exe.)
At the moment, the default behaviour for everything else in my VS project is to not produce warnings unless something might be wrong, which I may need to action.
WinForms,as of the latest release (2025) is the only thing which produces warning messages where there is not problem, which is not very tidy. I only want to see things in the build output which need my attention, defintely not 'happy' messages, or warnings which are not needed.
Currently, for each project in my solution, I get a message like:
1> [Telerik and Kendo UI Licensing]
1> Valid Telerik UI for WinForms license found. Make sure the main application also references Telerik.Licensing when using a class library.
...but I have a valid licence, and everything is OK. No action is needed.
Your support suggested adding...
<TelerikLicensingVerbosity>quiet</TelerikLicensingVerbosity>
...to each project in my solution, but that still produces the above build message.
A polite solution would be to turn-off ALL such warning messages, and let me switch them ON when needed. Preferably via a setting somewhere, not by editing the VS project file, which means unloading, editing the project file, and realoading each of many projects.
(Visual Studio 2026, not currently an option in the drop-down below)
I am working with the RadListView and noticed that its right and bottom border gets clipped at some (not all) width/heights and some scale factors (most notably 150% and 175%). This problem does not occur with the basic System.Windows.Forms.ListView.
Here is the code that I have wrote to replicate this problem with both the WinForms list view and the RadListView.
private void InitializeComponent()
{
this.listView1 = new System.Windows.Forms.ListView();
this.radListView1 = new Telerik.WinControls.UI.RadListView();
((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
this.SuspendLayout();
this.listView1.HideSelection = false;
this.listView1.Location = new System.Drawing.Point(155, 10);
this.listView1.Name = "listView1";
this.listView1.Size = new System.Drawing.Size(135, 175);
this.radListView1.Location = new System.Drawing.Point(5, 10);
this.radListView1.Name = "radListView1";
this.radListView1.Size = new System.Drawing.Size(135, 175);
this.radListView1.UseCompatibleTextRendering = true;
this.Controls.Add(this.radListView1);
this.Controls.Add(this.listView1);
this.Name = "RadForm1";
this.Text = "RadForm1";
((System.ComponentModel.ISupportInitialize)(this)).EndInit();
this.ResumeLayout(false);
}Here is a screenshot of the dialog when the scale factor is at 100% (left is the RadListView component):
and here is a screenshot of when my display is scaled at 150% (left is the RadListView component):
To replicate: run the project attached, both at 100% scaling and 150% scaling.
Thanks!
Contrary to Telerik.WinControls.UI.Barcode.QRCode, Telerik.WinControls.UI.Barcode.Symbology.QRCode creates invalid (unscannable) QR-Codes if the message contains umlauts when using ECIMode.UTF8.
We are using Symbology.QRCode, because we use it in columns of a RadGridView.
I've attached two example QR-Codes of the value "Bär", one using Barcode.QRCode, and the other one using Barcode.Symbology.QRCode.
Note: I have one scanner that can scan some of the Barcode.Symbology QR-Codes with umlauts.