Hello,
I'm trying to use the following javascript to delete the first page of a PDF prior to saving it. According to the API, this should be allowed in Reader, but requires Forms Rights.
this.deletePages({nStart: 0, nEnd: 0}) ;
I'm trying to delete the first page only of a multi-page document. I do realize that I should be able to do this with just:
this.deletePages();
And I've tried that as well.
I have tried running this from both a document level function and from a trusted function installed at the application level on a PDF that is
1) Both certified and given extended rights using Adobe Acrobat.
2) Just certified, w/o rights
3) Just given extended rights, not certified
4) Just a PDF, no rights or certification applied
In all cases I get the error:
NotAllowedError: Security settings prevent access to this property or method.
Doc.deletePages
I just want to make sure I'm not missing something here. I'm fairly convinced it can't be done, but since the API seems to say that it CAN, it's driving me crazy.
I did notice a note about after version 6.0, this function deletes SPAWNED pages, does that mean only spawned pages?
Thanks for any help you can provide,
Jane
Below the 'deletePages' description:
"[color=#FF0000]Note:[/color] You cannot delete all pages in a document; there must be at least one page remaining.
(Acrobat 6.0): Beginning with version 6.0, this method deletes spawned pages from within Adobe Reader for documents with forms usage rights enabled."
It appears that with Reader version 6 and above can only delete pages that have been added from spawaning the page from a template.
George Kaiser