Javascript_Embedder

Embeds Javascript into the PDF document.

Defined (1)

The class is defined in the following location(s).

/lib/dompdf/include/javascript_embedder.cls.php  
  1. class Javascript_Embedder { 
  2.  
  3. /** 
  4. * @var DOMPDF 
  5. */ 
  6. protected $_dompdf; 
  7.  
  8. function __construct(DOMPDF $dompdf) { 
  9. $this->_dompdf = $dompdf; 
  10.  
  11. function insert($script) { 
  12. $this->_dompdf->get_canvas()->javascript($script); 
  13.  
  14. function render(Frame $frame) { 
  15. if ( !$this->_dompdf->get_option("enable_javascript") ) { 
  16. return; 
  17.  
  18. $this->insert($frame->get_node()->nodeValue);