ZoomMode

Technical support for Spire.PDFViewer

Moderator: iceblue support

ZoomMode

Postby wcruzcc@gmail.com » Wed Mar 09, 2016 4:12 pm

I want the PDF to scale down or up to whatever the control size is. I try modifying "ZoomMode" with no luck. Is this the correct place to do this?
wcruzcc@gmail.com
 
Posts: 3
Joined: Wed Mar 09, 2016 3:14 pm

Re: ZoomMode

Postby Gary.zhang » Thu Mar 10, 2016 9:07 am

Hello,

Thanks for your inquiry. You can try to use the following method.
Code: Select all
 //
        // Summary:
        //     Zoom PDF document
        //
        // Parameters:
        //   percentage:
        //     Zoom percentage
        public void ZoomTo(int percentage);

Sincerely,
Gary
E-iceblue support team
User avatar
Gary.zhang
 
Posts: 1294
Joined: Thu Apr 04, 2013 1:30 am

Re: ZoomMode

Postby Gary.zhang » Fri Mar 11, 2016 7:18 am

Hello,

Have you tried it? Has the issue been resolved?
Thanks,
Gary
E-iceblue support team
User avatar
Gary.zhang
 
Posts: 1294
Joined: Thu Apr 04, 2013 1:30 am

Re: ZoomMode

Postby wcruzcc@gmail.com » Tue Mar 15, 2016 10:05 am

It doesn't matter what I put as a value, the PDF does not change.

Code: Select all
 private void button1_Click(object sender, EventArgs e)
        {
            pdfDocumentViewer1.ZoomTo(25);

            pdfDocumentViewer1.LoadFromFile("C:\\Document.pdf");
        }
wcruzcc@gmail.com
 
Posts: 3
Joined: Wed Mar 09, 2016 3:14 pm

Re: ZoomMode

Postby wcruzcc@gmail.com » Tue Mar 15, 2016 10:11 am

I though that this property needed to be set before loading the document. I moved it after the loadfromfile and now it scales as it should. If only there was a way to have it automatically scale to the pdfdocumentviewer window.
wcruzcc@gmail.com
 
Posts: 3
Joined: Wed Mar 09, 2016 3:14 pm

Re: ZoomMode

Postby Gary.zhang » Wed Mar 16, 2016 4:02 am

Hello,

Thanks for your response. You can set the ZoomMode as FitWidth to automatically scale to the pdfdocumentviewer window.
Code: Select all
pdfDocumentViewer.ZoomTo(Spire.PdfViewer.Forms.ZoomMode.FitWidth);

Sincerely,
Gary
E-iceblue support team
User avatar
Gary.zhang
 
Posts: 1294
Joined: Thu Apr 04, 2013 1:30 am


Return to Spire.PDFViewer

Who is online

Users browsing this forum: No registered users and 0 guests

cron