-none- 2007-09-07 - By Nick Kowalewicz
Back 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@(protected) [mailto:itext-questions-bounces@(protected)] On Behalf Of Shailendra Mishra Sent: Friday, September 07, 2007 3:59 AM To: iText-questions@(protected) 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@(protected)' 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@(protected)' 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
<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft -com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m= "http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR /REC-html40">
<head> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"> <meta name=Generator content="Microsoft Word 12 (filtered medium)"> <!--[if !mso]> <style> v\:* {behavior:url(#default#VML);} o\:* {behavior:url(#default#VML);} w\:* {behavior:url(#default#VML);} .shape {behavior:url(#default#VML);} </style> <![endif]--> <style> <!-- /* Font Definitions */ @(protected) {font-family:Calibri; panose-1 (See http://ose-1.ora-code.com):2 15 5 2 2 2 4 3 2 4;} @(protected) {font-family:Tahoma; panose-1 (See http://ose-1.ora-code.com):2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman","serif";} a:link, span.MsoHyperlink {mso-style-priority:99; color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {mso-style-priority:99; color:purple; text-decoration:underline;} span.EmailStyle17 {mso-style-type:personal; font-family:"Arial","sans-serif"; color:windowtext;} span.EmailStyle18 {mso-style-type:personal; font-family:"Arial","sans-serif"; color:navy;} span.EmailStyle19 {mso-style-type:personal; font-family:"Arial","sans-serif"; color:navy;} span.EmailStyle21 {mso-style-type:personal-reply; font-family:"Calibri","sans-serif"; color:#1F497D;} .MsoChpDefault {mso-style-type:export-only; font-size:10.0pt;} @(protected) Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} --> </style> <!--[if gte mso 9]><xml> <o:shapedefaults v:ext="edit" spidmax="1026" /> </xml><![endif]--><!--[if gte mso 9]><xml> <o:shapelayout v:ext="edit"> <o:idmap v:ext="edit" data="1" /> </o:shapelayout></xml><![endif]--> </head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans -serif"; color:#1F497D'>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.<o:p></o:p ></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans -serif"; color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans -serif"; color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans -serif"; color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans -serif"; color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans -serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> itext-questions-bounces@(protected) [mailto:itext-questions-bounces@(protected)] <b>On Behalf Of </b >Shailendra Mishra<br> <b>Sent:</b> Friday, September 07, 2007 3:59 AM<br> <b>To:</b> iText-questions@(protected)<br> <b>Subject:</b> [iText-questions] Urgent Help - How to close the pdf file through pushButton<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"; color:navy'>Dear Itext,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"; color:navy'> Please do help it out.:-<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>//this is for print button. It’s working fine<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>PushbuttonFiel lpbf = new PushbuttonField(writer, new Rectangle(20, vbot+30, 100, vbot+60), "Button1");<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>PdfAction ac1 = PdfAction.javaScript("this.print(true);\r", writer);<o:p></o:p> </span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>//This is for close Not Working<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>PdfAction ac1 = PdfAction.javaScript("this.close(true); \r", writer);<o:p></o:p ></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"; color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"; color:navy'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <strong><span style='font-size:8.0pt;font-family:"Tahoma","sans-serif";color:navy'>Thanks!!< /span></strong><span style='font-size:8.0pt;font-family:"Tahoma","sans-serif";color:navy'><o:p></o:p ></span></p>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'>With Kind Regards,</span></strong><span style='font-size:8.0pt; font-family:"Tahoma","sans-serif";color:navy'><o:p></o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Tahoma","sans -serif"; color:navy'> <o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'>Shailendra Kumar Mishra</span></strong><span style='font-size:8.0pt; font-family:"Tahoma","sans-serif";color:navy'><o:p></o:p></span></p>
</div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p> </o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center>
</div>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans -serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Shailendra Mishra <br> <b>Sent:</b> Friday, September 07, 2007 11:27 AM<br> <b>To:</b> 'iText-questions@(protected)'<br> <b>Subject:</b> Help - How to close the pdf file through pushButton</span><o:p> </o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>Hi All,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'> 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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>//this is for print button. It’s working fine<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>lpbf = new PushbuttonField(writer, new Rectangle(20, vbot+30, 100, vbot+60), "Button1");<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>PdfAction ac1 = PdfAction.javaScript("this.print(true);\r", writer);<o:p></o:p> </span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>//This is for close Not Working<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>PdfAction ac1 = PdfAction.javaScript("this.close(true); \r", writer);<o:p></o:p ></span></p>
<div>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <strong><span style='font-size:8.0pt;font-family:"Tahoma","sans-serif";color:navy'>Thanks!!< /span></strong><span style='font-size:8.0pt;font-family:"Tahoma","sans-serif";color:navy'><o:p></o:p ></span></p>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'>With Kind Regards,</span></strong><span style='font-size:8.0pt; font-family:"Tahoma","sans-serif";color:navy'><o:p></o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Tahoma","sans -serif"; color:navy'> <o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'>Shailendra Kumar Mishra</span></strong><span style='font-size:8.0pt; font-family:"Tahoma","sans-serif";color:navy'><o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='color:navy'><o:p> </o:p></span></p>
<p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <span style='color:navy'> </span><o:p></o:p></p>
</div>
<div>
<div class=MsoNormal align=center style='text-align:center'>
<hr size=2 width="100%" align=center>
</div>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans -serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Shailendra Mishra <br> <b>Sent:</b> Friday, September 07, 2007 11:15 AM<br> <b>To:</b> 'itext-questions-bounces@(protected)'<br> <b>Subject:</b> help - How to close the pdf file through pushButton</span><o:p> </o:p></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>Hi All,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'> 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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>//this is for print button. It’s working fine<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>lpbf = new PushbuttonField(writer, new Rectangle(20, vbot+30, 100, vbot+60), "Button1");<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>PdfAction ac1 = PdfAction.javaScript("this.print(true);\r", writer);<o:p></o:p> </span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>//This is for close Not Working<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans -serif"'>PdfAction ac1 = PdfAction.javaScript("this.close(true); \r", writer);<o:p></o:p ></span></p>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'><o:p> </o:p></span></strong></p>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'>Thanks in advance!!<o:p></o:p></span></strong></p>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'><o:p> </o:p></span></strong></p>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'>With Kind Regards,</span></strong><o:p></o:p></p>
<div>
<p class=MsoNormal><span style='font-size:8.0pt;font-family:"Tahoma","sans -serif"; color:navy'> <o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><strong><span style='font-size:8.0pt;font-family:"Tahoma", "sans-serif"; color:navy'>Shailendra Kumar Mishra</span></strong><span style='font-size:8.0pt; font-family:"Tahoma","sans-serif";color:navy'><o:p></o:p></span></p>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</body>
</html>
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|