Hey guys,

is it possible to save the state of a flash rich media annotation in a pdf 
generated with iText 5.0.5?
I thought it should be possible with the built-in functions 
multimedia_saveSettingsString() and multimedia_loadSettingsString(), but that 
does not work. When producing the swf and generating the pdf with Acrobat 
Extended Pro it works, but not in a iText generated pdf. :-( Though I set all 
encryptions to "ALLOW" state...
Here is my flex code for building the swf and loading/saving swf states:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; 
                                layout="vertical" horizontalAlign="center" 
verticalAlign="middle"  
                                creationComplete="initApp();" 
borderStyle="solid" borderColor="#000000">
        <mx:Script>
                <![CDATA[
                        import mx.controls.Alert;
                        private function changeSize():void
                        {
                                square.width=size.value;
                                square.height=size.value;
                                var result:Object = 
ExternalInterface.call("multimedia_saveSettingsString", size.value.toString());
                        }
                        
                        private function getSettings():void
                        {
                                // security handler null: pdf file can be 
edited!
                                var securityHandler:String = 
ExternalInterface.call("eval", "this.securityHandler");
                                var result:Object = 
ExternalInterface.call("multimedia_loadSettingsString");
                                Alert.show(result.toString(), 'Alert Box');
                                if (result)
                                        size.value = int(result.toString());
                        }       

                        public function initApp():void 
                        {
                                getSettings();
                        }
                        
                ]]>
        </mx:Script>
        <mx:Canvas width="300" height="350" >
                <mx:HBox width="100%" height="300" horizontalAlign="center" 
verticalAlign="middle" borderStyle="none" >
                        <mx:Canvas id="square" width="250" height="250" 
backgroundColor="#FE0000" borderStyle="none"/>
                </mx:HBox>
                <mx:HBox width="100%" height="300" horizontalAlign="center" 
verticalAlign="middle" borderStyle="none" >
                        <mx:Text enabled="false" id="val" 
text="{size.value.toString()}" fontFamily="Verdana" fontSize="30" 
fontWeight="bold"/>
                </mx:HBox>
                <mx:HSlider x="23" y="308" width="250" snapInterval="2" 
minimum="50" maximum="250" value="250" change="changeSize()" 
liveDragging="true" id="size" allowTrackClick="true" enabled="true" />
        </mx:Canvas>
        <mx:Button label="Button" click="getSettings()"/>
</mx:Application>

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to