Hi,

There is no PRINT in PdfAction, only PRINTDIALOG is avialable. Can you
please let me know how to fire off print menu item using iText or anyother
way to print without adding javascript.

I tried by adding PdfAction to PdfWriter object as follows

   PdfAction action = new PdfAction(PdfAction.PRINTDIALOG);
   pdfwriter.setAdditionalAction(PdfName.DOCUMENT_CLOSE, action);

The above code is not working if we disable javascript preference in pdf. Is
there anyway we can print pdf using iText with disabling javascript in pdf
..I got strucked here..Please help me as this is urgent requirement for my
customer..Thanks



Mark Storer-2 wrote:
> 
> 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/
> 

-- 
View this message in context: 
http://old.nabble.com/Javascript-Disable-issue-tp28410760p28441805.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
_______________________________________________
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/

Reply via email to