These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

using New sting(url) and not get a warning

mcapps
Registered: Jan 24 2008
Posts: 25

i am trying to save a pdf as a fdf and i can do that but ever time i use the "new String(URL)" in a button i get a waring messager i want to know if theres a way around the warning message

My Product Information:
Acrobat Pro 8.1.1, Windows
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
What is the warning message?

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

mcapps
Registered: Jan 24 2008
Posts: 25
the Security Warining is
Security Warning
the document is trying to connect to "file:////" (then were the) were the file is
if you trust the site, chosse allow. if ou do not trust the site, choose block
gkaiseril
Online
Expert
Registered: Feb 23 2006
Posts: 4307
The standard informational waring, just click on your choice and it will go away and perform the requested action. In the future will not receive this message when click on this item in the future unless you perfomr a reset.

George Kaiser

mcapps
Registered: Jan 24 2008
Posts: 25
I tred that but i still get the erro every time
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You might get the warning everytime, but does it work when you click "allow"?

The script you say causes the error cannot be the problem.

new String(URL)

This statement isn't Acrobat or LiveCycle JavaScript. It's core JavaScript. All it does is create a new string object. There must be more going on here.

You state that you are trying to save as FDF? I think you mean export the form data to FDF. This is obviously the problem. What code are you using? Any operation that writes data locally is restricted to a privileged context, and/or a Reader Rights enabled document. A button's mouse up event doesn't qualify. Look up the function you are using in the Acrobat JavaScript Reference and see what it has to say.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

mcapps
Registered: Jan 24 2008
Posts: 25
yeah i am tring to save the i am tring to wirte data locally so there no way around geting the warning
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
You can run the "doc.exportAsFDF()" from a folder level trusted function, but that's about it.

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script

mcapps
Registered: Jan 24 2008
Posts: 25
oh ok let me try that can you give me a expample of how its works please
thomp
Expert
Registered: Feb 15 2006
Posts: 4411
Here's an article on writing folder level scripts:

http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/folder_level_scripts/

In this article a folder level script is controled from a custom toolbar button:

http://www.acrobatusers.com/tutorials/2007/10/apply_security_with_js/


But you should start out by running your code in the console window. Here's an artical this topic:

http://www.acrobatusers.com/tech_corners/javascript_corner/tips/2006/javascript_console/

Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script