Forum rules DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.
When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
I am running the below JavaScript code to get the annotation states and return information on them. However what I would like is to get the Creation Date of the state instead of the Modified Date, is this possible?
I have tried changing the modDate to creationDate and searched through the Acrobat API manual but could not find any reference.
{var stateResults;
var returnResults;
returnResults = "";
var annot = this.getAnnot(0,"8d3ec689-a6bb-4e07-852e5992f5eb6a6b")
if (annot == null) {
res = "None";
} else {
var states = annot.getStateInModel("Review");
var state;
stateResults = "";
if (states.length > 0) {
for (k = 0; k < states.length; k++) {
state = "";
var s = states[k].state;
var d = util.printd(2, states[k].modDate);
var a = states[k].author;
state = s;
if (state === "");
stateResults = s + "|" + d + "|" + a + "|" + annot.name;
returnResults = returnResults + stateResults + "~";
}
}
var states = annot.getStateInModel("MyAppState");
var state;
stateResults = "";
if (states.length > 0) {
for (k = 0; k < states.length; k++) {
state = "";
var s = states[k].state;
var d = util.printd(2, states[k].modDate);
var a = states[k].author;
state = s;
if (state === "");
stateResults = s + "|" + d + "|" + a + "|" + annot.name;
returnResults = returnResults + stateResults + "~";
}
}
if (returnResults == "") {
res = "None";
} else {
res = returnResults;
}
}
}
there is an .getProps() method for annotations so that you can copy all the properties of a specific annotation.
And you do have both "modDate" and "creationDate" for all annotations. Of course creationDate is read only, while modDate can be written into.
I have spoken with the Dev team on this and have some unfortunate news for you. I will paste their findings below:
Dev Team wrote:as far as I see, the JS documentation does not specifies the list of properties that should be available in the state elements returned by getStateInModel method.
We return the same amount of properties that Acrobat does: Name, author, modDate, state, and stateModel.
If we will add, say, creationDate, it will make the code that relays on the presence of this property incompatible with Acrobat or other PDF apps.
As such, it seems that this property will not be added to our software at this time, in the name of retained compatibility with our competitors.
Kind regards,
Dan McIntyre - Support Technician
Tracker Software Products (Canada) LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com