One of either Get/SetRectCoordinatesOnDocumentInch has a bug

General discussions about GdPicture.NET.
Post Reply
eltonwisk
Posts: 1
Joined: Tue Jul 27, 2021 5:31 pm

One of either Get/SetRectCoordinatesOnDocumentInch has a bug

Post by eltonwisk » Fri Nov 12, 2021 6:25 pm

In our application, we allow the user to define a rectangle on a PDF document using the WPF GdViewer control.

When we use SetRectCoordinatesOnDocumentInch, and immediately call GetRectCoordinatesOnDocumentInch, the coordinates returned to not match what was passed to set.

Here is some sample data.

double left = 0, top = 0, width = 0, height = 0;
DocumentViewer.SetRectCoordinatesOnDocumentInch(0.217080444, 0.226247683, 3.48402667, 0.363420218);
DocumentViewer.GetRectCoordinatesOnDocumentInch(ref left, ref top, ref width, ref height);

The results we get are
left
0.11824942749237347

top
0.226247683

width
3.48402667

height
0.363420218

There is something either wrong with the set method where it sets the wrong coordinates, or there is something wrong with the get method returning incorrect coordinates.

Either way, there is some incorrect behavior.

I want to blame the set method more, because the rectangle does not appear in the correct location.

Or, is there something else about the GdViewer that might be impacting the behavior of these two methods, that we might need to correct in our code?

We are observing this behavior on our existing documents, and we want to note that everything works fine using the prior version of our application, which uses GdPicture9 and the WinForms viewer.

The code is virtually identical between the two, other than the minor naming differences from the changes to the WPF stuff.

There is definitely a bug I think, or broken backwards compatibility in terms of how the WPF documentViewer handles this compared to the old WinForms viewer.
____________________________
J.E. Flores Bakery Services

Hugo
Posts: 227
Joined: Tue Dec 18, 2018 10:09 am

Re: One of either Get/SetRectCoordinatesOnDocumentInch has a bug

Post by Hugo » Mon Nov 15, 2021 6:04 pm

Hi there,

Thank you for your feedback.

This may be a bug in an older version of our software. I am not sure if you mentioned this but if you are not using our latest version, could you try this please?
https://www.gdpicture.com/download-gdpicture/

If your issue persists in our latest version I would be needing a code project allowing me to reproduce this please. As this may be private we can further discuss this here:
https://orpalis.zendesk.com/hc/en-us/requests/new

Regards,

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest