I do not think there is a close event with Adobe Acrobat. What I
have done is send a javascript submit script to a web page. Within the opened web
page have a javascript OnLoad event trigger a window.close(); action.
From:
itext-questions-bounces@lists.sourceforge.net
[mailto:itext-questions-bounces@lists.sourceforge.net] On Behalf Of Shailendra
Mishra
Sent: Friday, September 07, 2007 3:59 AM
To: iText-questions@lists.sourceforge.net
Subject: [iText-questions] Urgent Help - How to close the pdf file
through pushButton
Dear Itext,
Please do help it out.:-
I
want to close the pdf file through the Pushbutton field. On the press of close
button the pdf file should be closed. I used for the print button it’s working
fine. Below is the code for print and close. Print is working fine not close.
Please do send the code for close button.
//this
is for print button. It’s working fine
PushbuttonFiel
lpbf = new PushbuttonField(writer, new Rectangle(20, vbot+30, 100, vbot+60),
"Button1");
PdfAction
ac1 = PdfAction.javaScript("this.print(true);\r", writer);
//This
is for close Not Working
PdfAction
ac1 = PdfAction.javaScript("this.close(true); \r", writer);
Thanks!!
With Kind Regards,
Shailendra Kumar Mishra
From: Shailendra Mishra
Sent: Friday, September 07, 2007 11:27 AM
To: 'iText-questions@lists.sourceforge.net'
Subject: Help - How to close the pdf file through pushButton
Hi
All,
I
want to close the pdf file through the Pushbutton field. On the press of close
button the pdf file should be closed. I used for the print button it’s working
fine. Below is the code for print and close. Print is working fine not close.
Please do send the code for close button.
//this
is for print button. It’s working fine
lpbf
= new PushbuttonField(writer, new Rectangle(20, vbot+30, 100, vbot+60),
"Button1");
PdfAction
ac1 = PdfAction.javaScript("this.print(true);\r", writer);
//This
is for close Not Working
PdfAction
ac1 = PdfAction.javaScript("this.close(true); \r", writer);
Thanks!!
With Kind Regards,
Shailendra Kumar Mishra
From: Shailendra Mishra
Sent: Friday, September 07, 2007 11:15 AM
To: 'itext-questions-bounces@lists.sourceforge.net'
Subject: help - How to close the pdf file through pushButton
Hi
All,
I
want to close the pdf file through the Pushbutton field. On the press of close
button the pdf file should be closed. I used for the print button it’s working
fine. Below is the code for print and close. Print is working fine not close.
Please do send the code for close button.
//this
is for print button. It’s working fine
lpbf
= new PushbuttonField(writer, new Rectangle(20, vbot+30, 100, vbot+60),
"Button1");
PdfAction
ac1 = PdfAction.javaScript("this.print(true);\r", writer);
//This
is for close Not Working
PdfAction
ac1 = PdfAction.javaScript("this.close(true); \r", writer);
Thanks in advance!!
With Kind Regards,
Shailendra Kumar Mishra