Answered
Hi,
I want to invoke client(pdf) side javascript from a servlet when a user
submits a form. I am sending the servlet response in FDF format. How do I execute
this javascript on the client side from the servlet?
Thanks in advance
There are however some security restrictions on delivering FDF content to a PDF. For example, both need to be in the same domain. Or the PDF needs to specify a cross domain file that allows the FDF.
Here's a simple example
%FDF-1.2
1 0 obj
<</FDF
<<
/Fields [<</T (ImportRslt) /V (JSTest.fdf Imported)>>]
/JavaScript <</Before (console.println("Before Import Script");)>>
>>
>>
endobj
trailer << /Root 1 0 R >>
%%EOF
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script