We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

How to set autofit width and autofit height programmatically?

Hello.

I use PdfViewControl and custom toolbar. I need to set autofit width and autofit height in my buttons event handlers. But, PdfViewControl contains no any methods or properties to do it. I found PdfDocumentView control, it has ZoomMode property. But firstly, it works incorrectly, and second, I must use PdfViewControl, because I need FindText method.

Can you show me the logic of your toolbar buttons for autofit width and autofit height? On your toolbar, it works correctly.

Thanks.

3 Replies

MN Meikanda Nayanar Syncfusion Team May 27, 2013 03:58 AM UTC

Hi Alexander,

Thank you for your interest in Syncfusion products.

At present we do not provide support for setting zoom mode for PdfViewer control. Could you please report “The ZoomMode property of PdfDocumentView is not working properly” through Direct Trac Developer Support System (https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents because you can take the advantage of the expertise of a dedicated support engineer and a guaranteed response time and we hope you will take advantage of this system as well. If you have already reported, please ignore this.

Please let us know if you have nay questions.

Thanks,

Meikandan



IH Isaac Hake March 20, 2014 07:45 PM UTC

Is there still no way around this issue? Did you ever figure this out Alexander?


US Uthistran S Syncfusion Team May 19, 2014 10:49 AM UTC

Hi Isaac/Alexander,

We have added support for setting ZoomMode in PdfViewerControl itself as in PdfDocumentView in our latest Essential Studio release and we have attached a simple sample on this.

Attachment: Sample-1047853779.zip

Run this sample, click the Fit- Width button in the left, you can see that the document is now viewed in Fit-Width Mode.

Please, let us know if you need any further assistance.

Thanks,

Uthistran S.


Loader.
Live Chat Icon For mobile
Up arrow icon