I need to fire an javascript while user execute SaveAs command via Menu,
hot-key, toolbar,. any where. And I use following code to attach my
script to the WILL_SAVE action.
                PdfAction action =
PdfAction.javaScript(PdfConverter.SCRIPT, writer);
                writer.setAdditionalAction(PdfWriter.WILL_SAVE, action);
        //      writer.addJavaScript(action);
But it doesn't fire the script while I use SaveAs to save the Document I
generated using iText.
I am sure that the script does work because I tried simply with the
commented code, and it succeed. The followed is the javascript:

app.alert('You can't save this document');

I looked at Adobe "Acrobat JavaScript Scripting Reference" , there is no
info depicts what is the difference between Save and SaveAs command. So
I don't know whether WILL_SAVE events fired.

Sincerely,
Jack Chen



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to