Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Access issue: doc.importdataobject("myPDF","/c/temp/outfile.pdf");


Level 1


I have a pdf created in livecycle designer es 8.2 and coded in Javascript. Currently this pdf is placed in the shared location from where users can access. When users hit the submit button then PDFCreator installed on user's machine creates a scanned pdf and place it on the local machine. This scan pdf is then embedded into the main pdf using privileged JavaScript function (doc.importdataobject("myPDF","/c/temp/outfile.pdf");).
Now, I want to place the main pdf on the server so that user can access the pdf using URL.
When user access the pdf using URL and hit the submit button, it's creating scan pdf on the user machine, but it's failing on the import statement -doc.importdataobject("myPDF","/c/temp/outfile.pdf");.

I am not sure whether this is access issue or I need to do something else.

The path /c/temp/outfile.pdf must be local machine path but I am assuming import statement is looking on server directory.

If I remove the path from the import statement, it pops up a dialog box for browse. After selecting the outfile.pdf it works fine. But I can't ask users to follow this process.

email: kec.sushil@gmail.com

Please help.

Thanks - Sushil

0 Replies