lib/ezpdf/classes/class.pdf.php
function PRVTadjustWrapText( $text, $actual, $width, &$x, &$adjust, $justification )
    {
        switch ( $justification )
        {
        case 'left':
            return;
            break;
        case 'right':
            $x += $width - $actual;
            break;
        case 'center':
        case 'centre':
            $x += ($width - $actual) / 2;
            break;
        case 'full':
            // count the number of words
            $words = explode( ' ', $text );
            $nspaces = count($words) - 1;
            if ( $nspaces > 0 )
            {
                $adjust = ($width-$actual) / $nspaces;
            }
            else
            {
                $adjust = 0;
            }
        break;
    }
    }
function PRVTadjustWrapText( $text, $actual, $width, &$x, &$adjust, $justification )
    {
        switch ( $justification )
        {
        case 'left':
            return;
            break;
        case 'right':
            $x += $width - $actual;
            break;
        case 'center':
        case 'centre':
            $x += ($width - $actual) / 2;
            break;
        case 'full':
            // count the number of words
            $words = explode( ' ', $text );
            $nspaces = count($words) - 1;
            if ( $nspaces > 0 )
            {
                $adjust = ($width-$actual) / $nspaces;
            }
            else
            {
                $adjust = 0;
            }
        break;
    }
    }
function PRVTadjustWrapText ( $ text , $ actual , $ width , & $ x , & $ adjust , $ justification ) { switch ( $ justification ) { case 'left' : return ; break ; case 'right' : $ x += $ width - $ actual ; break ; case 'center' : case 'centre' : $ x += ( $ width - $ actual ) / 2 ; break ; case 'full' : // count the number of words $ words = explode ( ' ' , $ text ) ; $ nspaces = count ( $ words ) - 1 ; if ( $ nspaces > 0 ) { $ adjust = ( $ width - $ actual ) / $ nspaces ; } else { $ adjust = 0 ; } break ; } }
do a part of the calculation for sorting out the justification of the text

@access private
do a part of the calculation for sorting out the justification of the text