@John: we strive not to provide direct answers (particularly in the SCJP forum???) but rather point people in the right direction: it's better to help people learn how to learn than to just spoonfeed answers.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: how to compare two strings having first few letter common