Expand my Community achievements bar.

SOLVED

Opening another PDF from a specific path yielding error

Avatar

Level 1

Hello,

I'm trying to open a PDF (child.pdf) from a PDF(main.pdf). If the both the main.pdf and child.pdf reside in the same directory, the code below works fine.

app.openDoc("child.pdf");

However, if I move the child.pdf to c:\pdf_templates\child.pdf and modify the code to:

app.openDoc("c/pdf_templates/child.pdf");

I get the following error:

Exception in line 1 of function top_level, script XFA:form1[0]:#subform[0]:Button1[0]:mouseUp

NotAllowedError: Security settings prevent access to this property or method.

App.openDoc:1:XFA:form1[0]:#subform[0]:Button1[0]:mouseUp

The error is to do with security settings preventing access to the another path. I have check and re-checked all security settings and I still get the error.

Any ideas on how I can overcome this issue???

Thanks,

Jose

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

the error message in Acrobat is misleading.

There is no security setting blocking you from opening the form.

You really have an raise error, because the path you provided is not correct.

The absolut path has to begin with a leading slash (/).

app.openDoc("/c/pdf_templates/child.pdf");

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

the error message in Acrobat is misleading.

There is no security setting blocking you from opening the form.

You really have an raise error, because the path you provided is not correct.

The absolut path has to begin with a leading slash (/).

app.openDoc("/c/pdf_templates/child.pdf");

Avatar

Level 1

Hi radzmar,

Your suggestion resolved my issue and you are correct the Acrobat error is very misleading.

I started going down the path of disclosure as I thought this was an issue with security.

Thanks,

Jose