Copy link to clipboard
Copied
I'm running Acrobat 8.31 on Windows 7 ... it's an old computer at my work
I don't think this should be hard. I am new to both JavaScript and JavaScript on Adobe, but I know Java and VBA pretty well.
From everything I've read, creating a trusted function and running extractPages from it should work and not be an error:
I test my function in the Debugger by passing in this...
test123(this);
(my code)
var test123 = app.trustedFunction(function(oDoc){
<then later>
oDoc.extractPages(previousPage, p, "file" + p); //previousPage and p are variables that are initialized
<later again
});
and I get this...
"NotAllowedError: Security settings prevent access to this property or method.
Doc.extractPages:20:Batch undefined:Exec"
I've have tried everything I can think of. Any idea why I would get this?
Where are previousPage and p defined? It will be better if you could post the full code.
Also, assuming "p" is a page number, you're missing the ".pdf" part of the file name in the last parameter of extractPages.
Copy link to clipboard
Copied
Where are previousPage and p defined? It will be better if you could post the full code.
Also, assuming "p" is a page number, you're missing the ".pdf" part of the file name in the last parameter of extractPages.
Copy link to clipboard
Copied
Oh my goodness. I can't believe that. It wouldn't work because I failed to put the + ".pdf" in extract pages. I literally spent the entire day yesterday rereading and editing my code when I just needed to say .pdf.
Thank you so much!!!
(Me so idiot)