There is no such version as iText 2.7.1. I assume that you're talking about iText 2.1.7.
iText 2.1.7 is 5 years old. Plenty of bugs have been fixed during those years, plenty of new functionality has been added. The scaleToFitLineWhenOverflow
is part of that new functionality. If you want to use it, please use a more recent version of iText. All versions prior to iText 5 (and all versions in the 5.2.x range) were "End Of Life" a couple of years ago. They are no longer supported. No further development will be done on those versions. Please read the FAQ for more background info.