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

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

define the document information

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

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

Referenced by addInfo(), and newDocument().

                                        {
  if ($action!='new'){
    $o =& $this->objects[$id];
  }
  switch ($action){
    case 'new':
      $this->infoObject=$id;
      $date='D:'.date('Ymd');
      $this->objects[$id]=array('t'=>'info','info'=>array('Creator'=>'R and OS php pdf writer, http://www.ros.co.nz','CreationDate'=>$date));
      break;
    case 'Title':
    case 'Author':
    case 'Subject':
    case 'Keywords':
    case 'Creator':
    case 'Producer':
    case 'CreationDate':
    case 'ModDate':
    case 'Trapped':
      $o['info'][$action]=$options;
      break;
    case 'out':
      if ($this->encrypted){
        $this->encryptInit($id);
      }
      $res="\n".$id." 0 obj\n<<\n";
      foreach ($o['info']  as $k=>$v){
        $res.='/'.$k.' (';
        if ($this->encrypted){
          $res.=$this->filterText($this->ARC4($v));
        } else {
          $res.=$this->filterText($v);
        }
        $res.=")\n";
      }
      $res.=">>\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