The reader only supports a small part of the full javascript. In the
documentation you have the javascript that the Reader supports.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: SARGHI Mircea Ionut [SMTP:[EMAIL PROTECTED]
> Sent: Thursday, June 26, 2003 10:13
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] JavaScript not working
> 
> Hi guys,
> 
> I am trying to add some javascript to my pdf page. Like this( I am trying
> to
> print the pdf and then close the doc).
> 
> Document document = new Document(psize, 0, 0, 0, 0);
> PdfWriter writer = PdfWriter.getInstance(document, new
> FileStream("completed.pdf", FileMode.Create));
> PdfAction printAct = PdfAction.javaScript("this.print(false);\r",writer);
> PdfAction closeAct =
> PdfAction.javaScript("this.closeDoc(true);\r",writer);
> writer.addJavaScript(printAct);
> writer.setAdditionalAction(PdfName.DP,closeAct);
> 
> When i open my docuemnt with Adobe Acrobat 5.0 it works fine. However the
> javascript will not execute in the Acrobat Reader 6.0.
> 
> Does anyone know why?
> 
> 
>  --
> SARGHI Mircea Ionut
> Senior Developer
> 
> IN WWW Ltd London
> 283 Archway Road
> Highgate
> London
> N6 5AA
> 
> [EMAIL PROTECTED]
> T: +44 020 8347 0202
> F: +44 020 8374 7478
> 
> Feel free to take a look at our brand new website !
> http://www.inwww.ltd.uk
> 
> Our previuos flash based website was awarded the Golden Web Award
> 2003-2004.
> Enjoy the experience at http://www.inwww.ltd.uk/v02
> 
> ==========================================================================
> ==
> This message is confidential. It may also be privileged or otherwise
> protected by work product immunity
> or other legal rules. If you have received it by mistake please let me
> know
> by reply and then delete it
> from your system; you should not copy the message or disclose its contents
> to anyone.
> ==========================================================================
> ==
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: INetU
> Attention Web Developers & Consultants: Become An INetU Hosting Partner.
> Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
> INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions


-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to