Zoom Limit constraints in viewing pdf

Discussions about document viewing.
Post Reply
rru
Posts: 3
Joined: Tue Dec 08, 2015 4:45 pm

Zoom Limit constraints in viewing pdf

Post by rru » Tue Dec 08, 2015 7:10 pm

Hello,

I have question about zoom factor limit. I am testing GdPicture demo to display PDF file in WinForms application on .NET 2.0. Maximum zoom reaches 534,44% and it can't go further, GdPictureStatus on ZoomIn() operation turns to "aborted". However, using sample app from installation_directory\Samples\WinForm\C#\Document Viewer on the same pdf allows zoom to go up to 1781.47%. I cannot send code, because it's part of commercial software and, besides that, probably it won't help much as there are too many other things going on there :) Someone asked similar question:
viewtopic.php?t=2391
but this topic is 5 years old and I don't have any problems with image size (based on how it behaves on sample app) and memory on computer.
Can you give me some tips what can I check to see why it's happening? Maybe it's rest of the code messing pdf somehow, but I would like to know all the options.
Only other thing I could think of was the difference in dll .Net Framework version. I am using the oldest one, 2.0. However, changing reference in sample app to the same "old" 2.0 dll doesn't change anything in zoomMax - it's still 1781.47%.

Cedric
Posts: 260
Joined: Sun Sep 02, 2012 7:30 pm

Re: Zoom Limit constraints in viewing pdf

Post by Cedric » Wed Dec 09, 2015 6:10 pm

Hello,

To be able to assist we definitely need more information, the source code would obviously help a lot but we may also require the test document so we can reproduce the described issue in the same conditions.
I understand that you cannot provide such data through a public forum but could you please provide the required materials through our support platform ?
It is secured and encrypted and we do not disclose any of the data our customers may send us, it is for strict internal use only so you don't have to worry about the privacy.

Thanks

rru
Posts: 3
Joined: Tue Dec 08, 2015 4:45 pm

Re: Zoom Limit constraints in viewing pdf

Post by rru » Wed Dec 16, 2015 3:54 pm

Thank you for your answer.
I managed to find the reason. Difference comes from "Platform target" setting in "Build settings". After changing that field from "Any CPU" to "x86" in sample application maximum zoom is 534,44% instead of 1781.47%, the same as in my app.

rru
Posts: 3
Joined: Tue Dec 08, 2015 4:45 pm

Re: Zoom Limit constraints in viewing pdf

Post by rru » Wed Dec 16, 2015 4:17 pm

Oh, also, could you tell me is this some kind of a bug or I don't know something I should now? :) It shouldn't affect maximum zoom so much, am I right?

Cedric
Posts: 260
Joined: Sun Sep 02, 2012 7:30 pm

Re: Zoom Limit constraints in viewing pdf

Post by Cedric » Wed Dec 16, 2015 4:32 pm

That's not a bug or anything, it is just an architecture difference.
In a nutshell a 32-bit process cannot address more than 2GB of memory so the capabilities are limited by this fact, on the other hand a 64-bit process can address much more memory than a 32-bit process.
The more you zoom an image the more it costs memory so the maximum zoom level is significantly higher with a 64-bit process.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest