public static float getWidth ( Phrase phrase , int runDirection , int arabicOptions ) { ColumnText ct = new ColumnText ( null ) ; ct . addText ( phrase ) ; ct . addWaitingPhrase ( ) ; PdfLine line = ct . bidiLine . processLine ( 0 , 20000 , Element . ALIGN_LEFT , runDirection , arabicOptions ) ; if ( line == null ) return 0 ; else return 20000 - line . widthLeft ( ) ; }
Gets the width that the line will occupy after writing . Only the width of the first line is returned .