public function convertToMM($css, $old=0.)
    {
        $css = trim($css);
        if (preg_match('/^[0-9\.\-]+$/isU', $css))        $css.= 'px';
        if (preg_match('/^[0-9\.\-]+px$/isU', $css))      $css = 25.4/96. * str_replace('px', '', $css);
        else if (preg_match('/^[0-9\.\-]+pt$/isU', $css)) $css = 25.4/72. * str_replace('pt', '', $css);
        else if (preg_match('/^[0-9\.\-]+in$/isU', $css)) $css = 25.4 * str_replace('in', '', $css);
        else if (preg_match('/^[0-9\.\-]+mm$/isU', $css)) $css = 1.*str_replace('mm', '', $css);
        else if (preg_match('/^[0-9\.\-]+%$/isU', $css))  $css = 1.*$old*str_replace('%', '', $css)/100.;
        else                                              $css = null;

        return $css;
    }
public function convertToMM($css, $old=0.)
    {
        $css = trim($css);
        if (preg_match('/^[0-9\.\-]+$/isU', $css))        $css.= 'px';
        if (preg_match('/^[0-9\.\-]+px$/isU', $css))      $css = 25.4/96. * str_replace('px', '', $css);
        else if (preg_match('/^[0-9\.\-]+pt$/isU', $css)) $css = 25.4/72. * str_replace('pt', '', $css);
        else if (preg_match('/^[0-9\.\-]+in$/isU', $css)) $css = 25.4 * str_replace('in', '', $css);
        else if (preg_match('/^[0-9\.\-]+mm$/isU', $css)) $css = 1.*str_replace('mm', '', $css);
        else if (preg_match('/^[0-9\.\-]+%$/isU', $css))  $css = 1.*$old*str_replace('%', '', $css)/100.;
        else                                              $css = null;

        return $css;
    }
public function convertToMM ( $ css , $ old = 0. ) { $ css = trim ( $ css ) ; if ( preg_match ( '/^[0-9\.\-]+$/isU' , $ css ) ) $ css .= 'px' ; if ( preg_match ( '/^[0-9\.\-]+px$/isU' , $ css ) ) $ css = 25.4 / 96. * str_replace ( 'px' , '' , $ css ) ; else if ( preg_match ( '/^[0-9\.\-]+pt$/isU' , $ css ) ) $ css = 25.4 / 72. * str_replace ( 'pt' , '' , $ css ) ; else if ( preg_match ( '/^[0-9\.\-]+in$/isU' , $ css ) ) $ css = 25.4 * str_replace ( 'in' , '' , $ css ) ; else if ( preg_match ( '/^[0-9\.\-]+mm$/isU' , $ css ) ) $ css = 1. * str_replace ( 'mm' , '' , $ css ) ; else if ( preg_match ( '/^[0-9\.\-]+%$/isU' , $ css ) ) $ css = 1. * $ old * str_replace ( '%' , '' , $ css ) / 100. ; else $ css = null ; return $ css ; }
convert a distance to mm

@access public
@param  string $css distance to convert
@param  float  $old parent distance
@return float  $value
convert a distance to mm