When I add a large image annotation (approx 1000px x 1250px) to the WpfAnnotationViewer, then save and reload the PDF, I get lag when adding a new annotations. It also seems to happen, when I add a lot of small annotations.
The lag is most obvious when adding a freehand pen annotation, there is a large gap between the first and second point (so it forms a straight line), before it starts behaving normally.
Below is my loading code (not sure if that's the issue, since the lag doesn't happen until the PDF has been saved and re-loaded)?
The image shows the freehand annotations (in red), they all have large straight sections at the beginning, but should have followed the drawn path (that wasn't straight).
https://ibb.co/Cmjk5C7
Code: Select all
//Loading PDF file
this.annotationViewer.Dispatcher.Invoke(new Action(() =>
{
this.annotationViewer.Image = image;
//Set the initial zoom
UpdateZoom(Vintasoft.Imaging.UI.ImageSizeMode.BestFit);
(ViewManager.Instance.ControlsWindow.DataContext as ControlsWindowVM).MinZoomValue = (float)this.annotationViewer.Zoom;
}));