public float getWidthCorrected(float charSpacing, float wordSpacing)
    {
        if (image != null) {
            return image.getScaledWidth() + charSpacing;
        }
        int numberOfSpaces = 0;
        int idx = -1;
        while ((idx = value.indexOf(' ', idx + 1)) >= 0)
            ++numberOfSpaces;
        return width() + (value.length() * charSpacing + numberOfSpaces * wordSpacing);
    }
public float getWidthCorrected ( float charSpacing , float wordSpacing ) { if ( image != null ) { return image . getScaledWidth ( ) + charSpacing ; } int numberOfSpaces = 0 ; int idx = - 1 ; while ( ( idx = value . indexOf ( ' ' , idx + 1 ) ) >= 0 ) ++ numberOfSpaces ; return width ( ) + ( value . length ( ) * charSpacing + numberOfSpaces * wordSpacing ) ; }
Gets the width of the <CODE>PdfChunk</CODE> taking into account the
extra character and word spacing.
@param charSpacing the extra character spacing
@param wordSpacing the extra word spacing
@return the calculated width