Page 1 of 1

High CPU Usage when viewer.SizeMode set to FitToWidth when editing form fields

Posted: Fri Oct 14, 2022 3:01 am
by IntegraHarlan
Hi,
I am seeing that when editing form fields the cpu useage goes up by about 20 - 30%.
This happens when the viewer.SizeMode is set to FitToWidth, FitToHeight, or BestFit.

I do not see the CPU usage increase when the SizeMode is set to Normal, or if I set it to a specific zoom percentage.
I have not been able to reproduce this issue in your demo app.
I have spent a bunch of time trying to figure out what is causing this issue and have not been able to find out what is causing this. I hope this is something that you may have seen before, or maybe you know what is going on.

Any information would be helpful.
We are currently using Imaging .NET SDK 12.0.2.1

Thanks
Harlan

Re: High CPU Usage when viewer.SizeMode set to FitToWidth when editing form fields

Posted: Fri Oct 14, 2022 10:11 am
by Alex
Hi Harlan,

The Zoom mode uses static value of zoom in image viewer.

The FitToWidth, FitToHeight and BestFit modes use dynamic value of zoom in image viewer. Zoom value is changed if size of image or image viewer is changed.

Do you change size of image or image viewer when you are editing text of form field on PDF page?

If no, there should be no difference between Zoom and BestFit modes.

If you cannot find reason of problem, please reproduce the problem using simple project and send us project for analysis.

P.S. Do you use WinForms or WPF image viewer?

Best regards, Alexander

Re: High CPU Usage when viewer.SizeMode set to FitToWidth when editing form fields

Posted: Mon Oct 17, 2022 9:26 pm
by IntegraHarlan
Hi Alex.
Thank you for your quick response.
We are using the Winforms image viewer.

"Do you change size of image or image viewer when you are editing text of form field on PDF page?"

Are you asking if we are changing the size of the document or the form field that we are editing?
We are using the viewer.SizeMode property to set the zoom level which does change to document size.
We are not changing the size of the form field except for using the viewer.SizeMode property.

Thanks

Re: High CPU Usage when viewer.SizeMode set to FitToWidth when editing form fields

Posted: Tue Oct 18, 2022 8:42 am
by Alex
Hi Harlan,

Thank you for information.

If you do not change value of ImageViewer.SizeMode property during editing of form field, there should be no difference between Zoom and BestFit modes in image viewer. Could you send us (to support@vintasoft.com) a small WinForms project, which allows to reproduce the problem?

Best regards, Alexander