basically it says in assignment conversions, the type of expression must be converted to the type of the variable. also if you look in the return type section in JLS , you will see that they use assignment conversion. so whatever you return must be assignable to the return type mentioned in your method using assignment conversion rules/contexts given in the book. since null can be assigned to any object reference variable, null is a valid return type from any method returning any object.
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