How do I make a docs viewer?

How to make a docs reader using mit (I mean not a app that searches for pdf files or opens with other app but an app that directly opens any docs without the help of other viewers)

How to make a doc reader,is it possible or are there limits
pls tell me how to make a doc reader that reades all .docs .pdf .xml
are there any extentions available for that and if you know pls tell me how to make

This method may help:

The use of the google viewer may show other formats as well