We are using the Vintasoft.Imaging.Wpf.UI.WpfImageViewer from the Imaging .NET SDK (Standard, WPF, Reader) to display PDF Documents (without the Annotation .NET Plug-in). The viewer shows also all PDF annotations.

A new requirement is to toggle the visiblity of the annotations. The user should be able to hide and show the annotations.

How can we temporarily hide the annotations without modifying the PDF document itself?

This seems to work with our test files and with a call to Vintasoft.Imaging.VintasoftImage.Reload(true) I'm able to switch the visibility "at runtime".

But I'm not sure if there can be other XObjects in PDF documents that are not annotations. Theses XObjects should be shown even if the annotations are hidden. Can I filter for a certain ResourceType? What is your opinion?