Modified Flag

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

Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Modified Flag

Post by Rad1 »

HI,

How can I get the value of Document.Modified flag using JS ?

I use this code but it doesn't work :

Code: Select all

var flag = new Number()
PDFView.GetDocumentProperty(0, "Modified", flag, 0)
alert(flag)
The code return 0.

PS : SetProperty work fine.

Thanks for help.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Modified Flag

Post by Corwin - Tracker Sup »

Try to use next code

Code: Select all

var flag = PDFView.Property("Documents[0].Modified", 0);
alert(flag);
HTH
Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Re: Modified Flag

Post by Rad1 »

Yeah, YHANK YOU VERY VERY MUCH.

It works.
regards
Rad1
User
Posts: 108
Joined: Wed May 13, 2009 2:21 pm

Re: Modified Flag

Post by Rad1 »

Corwin wrote:Try to use next code

Code: Select all

var flag = PDFView.Property("Documents[0].Modified", 0);
alert(flag);
HTH
But !! I have the same problem when I want to get DocumentID. I need it because if I use this PDFView.Property("Documents[ID].Modified", 0); I must specify the document ID. I tested the following code, it doesn't work :

Code: Select all

var flag = new Number()
PDFView.GetDocumentProperty([color=#FF0000]ID[/color], "Modified", flag, 0)
alert(flag)
When I use this PDFView.GetDocumentProperty(ID1, "Modified", flag, 0) and If I set ID1 = 0, It means the active document...

but when using this PDFView.Property("Documents[ID2].Modified", 0); I must specify the unique Document ID (== ID2).

Please help me.
thanks.
Corwin - Tracker Sup
User
Posts: 664
Joined: Tue Nov 14, 2006 12:23 pm

Re: Modified Flag

Post by Corwin - Tracker Sup »

Please note that Java Script cannot return value through function parameter, so GetDocumentProperty function will not return any value in DataOut.
Insted try this code:

Code: Select all

var DocID = PDFView.Property("Documents.Active", 0);
alert(DocID);
var flag = PDFView.Property("Documents[#"+DocID+"].Modified", 0);
alert(flag);
PDFView.Property("Documents[#"+DocID+"].Modified", 0);
HTH