Welcome to the .NET MAUI feedback portal. We’re happy you’re here! If you have feedback on how to improve the .NET MAUI, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Exception
The PdfViewer throws the exception below when using a RELEASE build. Debug seems fine.
System.NullReferenceException: Object reference not set to an instance of an object
at Syncfusion.Maui.PdfViewer.SfPdfViewer.HideToolbar()
at Syncfusion.Maui.PdfViewer.SfPdfViewer.ShowToolbarsPropertyChanged(BindableObject bindable, Object oldValue, Object newValue)
at Microsoft.Maui.Controls.BindableObject.SetValueActual(BindableProperty property, BindablePropertyContext context, Object value, Boolean currentlyApplying, SetValueFlags attributes, SetterSpecificity specificity, Boolean silent)
at Microsoft.Maui.Controls.BindableObject.SetValueCore(BindableProperty property, Object value, SetValueFlags attributes, SetValuePrivateFlags privateAttributes, SetterSpecificity specificity)
at Microsoft.Maui.Controls.BindableObject.SetValue(BindableProperty property, Object value)
Markup examples

Add PdfViewer markup
Set the DocumentSource to a stream in markup or code behind.
Review in debug mode- seems to work fine
Check the same in a Release build and note the Exception logged as mentioned above