ZF-3155: Add ActionScript support
Description
Add programmatically actionscript code like this www.fpdf.de/downloads/addons/36/" rel="nofollow">FPDF addon .
There are two function (setJavascript and getJavascript) in Zend/Pdf.php but these are not used in the whole ZF (1.5.1)
Comments
Posted by Wil Sinclair (wil) on 2008-06-09T12:33:28.000+0000
Alex, please prioritize this according to demand in the community and level of effort.
Posted by talv bansal (talv) on 2009-09-03T03:56:29.000+0000
Has there been any work done on this at all, ive searched and searched for days and only manged to come across this code snip from a few years ago:
http://osdir.com/ml/php.zend.framework.formats/…
[add this to the zend/pdf.php class]
public function setEmbeddedJS($javascript) { /** * Names container */ if ( null === $javascript || '' === $javascript) { throw new Zend_Pdf_Exception( "Javascript must be set." ); } $this->setJavaScript($javascript); $js_code = array( "S" => new Zend_Pdf_Element_Name('JavaScript'), "JS" => new Zend_Pdf_Element_String($this->getJavascript()) ); $embed[] = new Zend_Pdf_Element_String('EmbeddedJS'); $embed[] = $this->_objFactory->newObject(new Zend_Pdf_Element_Dictionary($js_code)); $js_ref = $this->_objFactory->newObject(new Zend_Pdf_Element_Dictionary(array('Names' => new Zend_Pdf_Element_Array($embed)))); $this->_trailer->Root->Names = new Zend_Pdf_Element_Dictionary(array('JavaScript' => $js_ref)); }
whilst this works for new pdfs generated by the user entirely, it doesn't inject script into pdfs that have been opened edited and amended which is giving me a load of ball ache, has anyone got any ideas how i could use it to inject JS into an exsiting PDF??
Posted by Rob Allen (rob) on 2012-11-20T20:53:12.000+0000
Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".
Feel free to re-open and provide a patch if you want to fix this issue.