Logo Search packages:      
Sourcecode: acidbase version File versions  Download package

Cpdf::o_action ( id,
action,
options = '' 
)

an action object, used to link to URLS initially

Definition at line 726 of file class.pdf.php.

References $options, ARC4(), encryptInit(), and filterText().

Referenced by o_annotation().

                                          {
  if ($action!='new'){
    $o =& $this->objects[$id];
  }
  switch ($action){
    case 'new':
      if (is_array($options)){
        $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>$options['type']);
      } else {
        // then assume a URI action
        $this->objects[$id]=array('t'=>'action','info'=>$options,'type'=>'URI');
      }
      break;
    case 'out':
      if ($this->encrypted){
        $this->encryptInit($id);
      }
      $res="\n".$id." 0 obj\n<< /Type /Action";
      switch($o['type']){
        case 'ilink':
          // there will be an 'label' setting, this is the name of the destination
          $res.="\n/S /GoTo\n/D ".$this->destinations[(string)$o['info']['label']]." 0 R";
          break;
        case 'URI':
          $res.="\n/S /URI\n/URI (";
          if ($this->encrypted){
            $res.=$this->filterText($this->ARC4($o['info']));
          } else {
            $res.=$this->filterText($o['info']);
          }
          $res.=")";
          break;
      }
      $res.="\n>>\nendobj";
      return $res;
      break;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index