lib/ezpdf/classes/class.pdf.php
function o_info( $id, $action, $options = '' )
    {
        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' => 'eZ Publish CMS, http://ez.no',
                                                          '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;
        }
    }
function o_info( $id, $action, $options = '' )
    {
        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' => 'eZ Publish CMS, http://ez.no',
                                                          '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;
        }
    }
function o_info ( $ id , $ action , $ options = '' ) { 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' => 'eZ Publish CMS, http://ez.no' , '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 ; } }
define the document information
define the document information