I hate Acrobat X. I am getting stupid errors and am missing all sorts of metadata functionality. I can't even browse (nevermind edit) metadata in Explorer, and see no solution for it anywhere on the net.
I used this javascript in Acrobat 9 with NO PROBLEMS. In Acrobat X I get Syntax error missing ( before condition 8: on row 9 and can't proceed. So what is different about Javascript in 9 that changed in X, and where do I find these changes?
/* Filename to metadata (title, author) */
var fname = this.documentFileName;
var deliminator = " - "
var lookfor = fname.lastIndexOf(deliminator);
// Splice components
if lookfor = -1
{
var string1 = fname.slice(lookfor + deliminator.length, fname.length).replace(/.pdf/gi, "")
}
else
{
var string1 = fname.slice(fname, lookfor)
var string2 = fname.slice(lookfor + deliminator.length, fname.length).replace(/.pdf/gi, "")
}
// Insert values
this.info.Title = string1
this.info.Author = string2