List of page properties

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

List of page properties

Post by relapse »

How could I use the function GetDocumentProperty so that I could find out the actual zoom property value of a document's page:

Code: Select all

object z;
ctrl.GetDocumentProperty(docId, "Pages[0].Zoom", out z, 0);
???

There is such Property, but executing this code I get a COMException. I guess it's a setter method.


With Width-Property it works:

Code: Select all

object w;
ctrl.GetDocumentProperty(docId, "Pages[0].Width", out w, 0);
Thanks
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: List of page properties

Post by Stefan - PDF-XChange »

Hello relapse,

I'll speak with my colleagues to see why this is causing you troubles but you should be able to obtain the current zoom level using JS.
"this.zoom" should return to you the current zoom level of the currently active document.

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

Re: List of page properties

Post by relapse »

Thanks, it works! Slowly but surely I should start learning JavaScript :)
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: List of page properties

Post by Stefan - PDF-XChange »

:)
Make sure to have a copy of the
JavaScript for Acrobat API Reference.

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

Re: List of page properties

Post by relapse »

I already do have that one. :D
User avatar
Stefan - PDF-XChange
Site Admin
Posts: 19885
Joined: Mon Jan 12, 2009 8:07 am

Re: List of page properties

Post by Stefan - PDF-XChange »

:)