Salesforce 我想阅读.word格式的文档正文,并在VF页面中将正文的内容显示为字符串

Salesforce 我想阅读.word格式的文档正文,并在VF页面中将正文的内容显示为字符串,salesforce,apex,Salesforce,Apex,我已经在Document对象中上传了一个.word文件。现在我想获取该文件的内容(正文),并在VisualForce页面中显示整个内容 Document doc = [Select d.body from Document d where d.name='docname'; Blob b = doc.body; String Str = b.toString(); //This Giving an Error Encoding UTC8. //Then Modified to like be

我已经在Document对象中上传了一个.word文件。现在我想获取该文件的内容(正文),并在VisualForce页面中显示整个内容

Document doc = [Select d.body from Document d where d.name='docname';
Blob b = doc.body;
String Str = b.toString();

//This Giving an Error Encoding UTC8.

//Then Modified to like below but it's not giving correct data.
//It's giving like    @5ywnnn7*96w**.

Document doc = [Select d.body from Document d where d.name='docname';
Blob b = doc.body;
String Str = EncodingUtil.base64Encode(b);
提前谢谢