help inserting pages from an attachment
I have a pdf that depending on user input inserts various different pages. At the moment I have all the files that are used to insert pages contained in the same folder as the original pdf and this works, however I dont want to have to accompany my pdf with an additional folder of files when I give it to other users. What I instead would like to do is attach all the extra files to the orginal pdf, however I am having trouble getting this to work.
I am able to open the attachments using:
var attachedFile = app.openDoc("|" + this.path + "|U:attached filename.pdf")
but it will not allow me to use the same path with insertPages ie:
myTrustedInsertPagesFunction(oDoc,nPage,"|" + this.path + "|U:attached filename.pdf")
also tried
myTrustedInsertPagesFunction(oDoc,nPage,attachedFile.path)
this gives me the following error
RaiseError: A file error has occurred.
Doc.insertPages:30:Console undefined:Exec
===> A file error has occurred.
anhy help or alternative methods of achieving the same result would be appreciated.
