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.
Continuous zooming
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 275
- Joined: Mon Aug 04, 2008 5:04 pm
Re: Continuous zooming
Not C#, but an easy VB example:relapse wrote:what does the function call look like if I'd like to zoom a document to e.g. 22%?
Code: Select all
pdfZoomFaktor = 22
DoVerb "Documents[0].Pages.Zoom", "set", pdfZoomFaktor, Nothing, 0
-
- User
- Posts: 167
- Joined: Wed Jan 18, 2012 11:10 am
Re: Continuous zooming
Thanks a lot. It works!
-
- Site Admin
- Posts: 19868
- Joined: Mon Jan 12, 2009 8:07 am
-
- User
- Posts: 13
- Joined: Tue May 21, 2013 7:19 am
Re: Continuous zooming
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.. (?)
-
- Site Admin
- Posts: 19868
- Joined: Mon Jan 12, 2009 8:07 am
Re: Continuous zooming
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
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
-
- Site Admin
- Posts: 2445
- Joined: Thu Jun 30, 2005 4:11 pm
Re: Continuous zooming
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):or by:
- is the right way, optimal for developers.
Best
Regards.
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)
Code: Select all
pdfZoomFaktor = 22
SetDocumentPropperty(docID, "Pages.Zoom", pdfZoomFaktor, 0)
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.
Please archive any files posted to a ZIP, 7z or RAR file or they will be removed and not posted.