For PDF, try FPDF libray and for word, I am still looking for some thing which can read MS-Word document. I am successful in reading Open Office documents till now