IIRC, you can set the action to fire off any menu item without script... I don't recall the name of the print menu item off the top of my head...
Ah! iText supports it directly. Use this instead of your JS action: new PdfAction( PdfAction.PRINT ) // or PdfAction.PRINTDIALOG That works out to "Print" and... Ugh... PRINTDIALOG is a JS action. That settles that. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; Disclaimer<Cardiff> DisCard = null; ________________________________ From: pavan kumar [mailto:[email protected]] Sent: Friday, April 30, 2010 2:43 AM To: [email protected] Subject: [iText-questions] Javascript Disable issue Hi, In our application we are using iText to create PDF and print by adding javascript. Currently due to security reasons one of my client disabling javascript in PDF and requesting to provide print functionality for the PDF where the javascript is disabled. Does iText provide any API to enable javascript and disable javascript ? (I did see PdfViewerPreferences to set and get preferences but there is no preference related javascript), So that in our application we can enable javascript before print and disable after print.If not is there anyway to print PDF using iText without adding javascript. Please let me know. Thanks Pavana Kumar Bellala. No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.814 / Virus Database: 271.1.1/2842 - Release Date: 04/30/10 04:34:00
------------------------------------------------------------------------------
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/
