Question
Invalid arguments on Doc.insertPages - Acrobat SDK
I'm trying to insert a page into an attachment of a PDF. I have a main pdf file called "Ctrl.pdf" that has several attachments. Inside a Trusted Function called via button in "Ctrl.pdf" I get the Doc of the attachment:
att = this.openDataObject("myAttachment.pdf");
Then I try to insert a page to that attachment:
att.insertPages ({
nPage: 0,
cPath: "/c/new-pages.pdf",
nStart: 0
});
But get the following error:
InvalidArgsError: Invalid arguments.
Doc.insertPages
InvalidArgsError: Invalid arguments.
Doc.insertPages
I dont see how the arguments are wrong, I'm sure the location is correct, also tryed with relative path but nothing changed.
