NotAllowedError: on posting to html from PDF
Submitted by lingeng on Thu, 08/04/2011 - 00:21
I downloaded the part3.chapter09.JSForm example and it works perfectly. I used the same code to add the "POST TO HTML" button on my own pdf file. however, when I clicked on the button, I got error as follows on a javascript debugger popup window:
"Built-in Functions Version 9.0
Acrobat Annotations / Collaboration Built-in Wizard Functions Version 9.0
Acrobat SOAP 9.0
NotAllowedError: Security settings prevent access to this property or method.
Doc.disclosed:1:Field post:Mouse Up"
Is this a security issue? Please help. Thank you in advance.
- Login to post comments
Content © 2010 1T3XT BVBA

It's a tiff fle
Submitted by lingeng on Sun, 08/07/2011 - 18:53.The file I started with was a tiff file. I used iText API to open it and add the "POST TO HTML" button. I'll try to create a new PDF file and add button to see if that works.
thanks.
Here is what I did
Submitted by lingeng on Fri, 08/05/2011 - 02:09.I'm basically using your exact code JSForm.java, post_to_html.js, post_from_html.js, and javascript.html. I used the first three files to process my own pdf file to add the "POST TO HTML" button. I modified the post_to_html a bit as follows since I don't have fillable fields on my pdf form:
if(this.hostContainer) {
var names = new Array();
names[0] = "int_user";
names[1] = "user123";
try{
this.hostContainer.postMessage(names);
}
catch(e){
app.alert(e.message);
}
}
After I ran the java code to produce the result pdf file with the button added and javascript embeded, I launched the javascript.html. the new pdf file (javascript.pdf) was loaded and the "POST TO HTML" button was shown. I clicked on the button and the error was shown on a popup javascript debugger as I posted previously. I have no problem to post message from html to PDF. It looks like the JavaScript embedded in the "POST TO HTML" button action (post_to_html.js) could not be executed. While post_from_html.js is executed without any problem.
I only have Adobe Reader on my system.
Any idea what could be the problem? thank you for your help.
Not sure
Submitted by Bruno Lowagie on Fri, 08/05/2011 - 08:21.I'm not sure, but you're adding some interesting info:
you say that the PDF you're adding the button to, isn't a form to start with.
Maybe that's the problem.
Please read the Acrobate JavaScript reference
Submitted by Bruno Lowagie on Thu, 08/04/2011 - 07:41.You're trying to achieve something that isn't allowed. For instance: you're using a method that is only allowed in Acrobat, not in Reader. Or you're overlooking something simple like
this.disclosed = true;(see http://examples.itextpdf.com/resources/js/post_from_html.js )It's very hard to help you remotely, because we don't know exactly what you're doing, and as you confirmed: it works for us; if you do it correctly, it should work for you too.