Copy link to clipboard
Copied
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");
att.insertPages ({
nPage: 0,
cPath: "/c/new-pages.pdf",
nStart: 0
});
Copy link to clipboard
Copied
in the future, to find the best place to post your message, use the list here, https://community.adobe.com/
p.s. i don't think the adobe website, and forums in particular, are easy to navigate, so don't spend a lot of time searching that forum list. do your best and we'll move the post if it helps you get responses.
<moved from using the community>
Copy link to clipboard
Copied
Try this :
Put the file in a folder of the C drive
E.g. /C/temp/...
Copy link to clipboard
Copied
I thought that might be the case, too, but it doesn't seem to be. It seems some types of editing of the attached document are allowed, and others are not... It's very odd. It might have to do with the fact that it is opened as a hidden document, instead of being displayed on the screen. For example, I was able to modify the file's metadata using a similar code, but not the pages in it.
Copy link to clipboard
Copied
Thamks for the reply, but it doesn't seem to be the problem, previously the file was in a subfolder and the error was the same.