Continuous zooming

PDF-XChange Viewer SDK for Developer's
(ActiveX and Simple DLL Versions)

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

relapse
User
Posts: 167
Joined: Wed Jan 18, 2012 11:10 am

Continuous zooming

Post by relapse »

Hi, a new question: I need a function to zoom in/out a document without defined zoom values (like the function "Zoom100"). In the docs I've found the function "ZoomTo". If I use it in this way (C#):

object data;
ctrl.DoVerb(null, "ExecuteCommand", "ZoomTo", out data);


-> what does the function call look like if I'd like to zoom a document to e.g. 22%?


Thanks.
Dorwol
User
Posts: 275
Joined: Mon Aug 04, 2008 5:04 pm

Re: Continuous zooming

Post by Dorwol »

relapse wrote:what does the function call look like if I'd like to zoom a document to e.g. 22%?
Not C#, but an easy VB example:

Code: Select all

pdfZoomFaktor = 22
DoVerb "Documents[0].Pages.Zoom", "set", pdfZoomFaktor, Nothing, 0
relapse
User
Posts: 167
Joined: Wed Jan 18, 2012 11:10 am

Re: Continuous zooming

Post by relapse »

Thanks a lot. It works!
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: Continuous zooming

Post by Stefan - PDF-XChange »

:)
1shadow
User
Posts: 13
Joined: Tue May 21, 2013 7:19 am

Re: Continuous zooming

Post by 1shadow »

I'm facing the same problem but I think this question is still unanswered - although the workaround works for me, the essence of the problem is how to pass data to executeCommand operation, i.e. ZoomTo.. (?)
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19868
Joined: Mon Jan 12, 2009 8:07 am

Re: Continuous zooming

Post by Stefan - PDF-XChange »

Hi 1shadow,

I've asked one of the Viewer SDK experts to assist here and we will post a bit later here our further comments.

Regards,
Stefan
User avatar
Vasyl - PDF-XChange
Site Admin
Posts: 2445
Joined: Thu Jun 30, 2005 4:11 pm

Re: Continuous zooming

Post by Vasyl - PDF-XChange »

Hi, 1shadow.

The 'ZoomTo' is simple UI-command, it works like button in toolbar or item in drop-down menu. So you cannot pass additional arguments to it.

The changing zoom by (thanks to Dorwol):

Code: Select all

pdfZoomFaktor = 22
DoVerb("Documents[0].Pages.Zoom", "set", pdfZoomFaktor, null, 0)
or by:

Code: Select all

pdfZoomFaktor = 22
SetDocumentPropperty(docID, "Pages.Zoom", pdfZoomFaktor, 0)
- is the right way, optimal for developers.

Best
Regards.
PDF-XChange Co. LTD (Project Developer)

Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.