Alcumus/react-doc-viewer

Docx, Doc file is not working i am passing base64data URI

Opened this issue · 0 comments

HI,
I am passing base64 data uri as a prop for the react document viewer package
but it working fine for the hosted azure blob storage url viewing the docx and doc file
But unfortunately i need base64data uri support to view the docx and doc file
i used these approaches but its not working for me ..
First Way----- base64data URI
data:application/vnd.openxmlformats-officedocument.wordprocessingml.document;base64,uioipoipo9000jk
data:application/msword;base64,uioipoipo9000jk65656hhhhhhhhhhhhhhhh454545dffffffffffffffffffffffffffffffff

Second Way----- Converting arrybuffer to bloburl
const bloburls = new Blob([arrayBuffer],{ type: 'application/docx' });
const blobUrl = URL.createObjectURL(bloburls);
const viewerUrl = https://docs.google.com/gview?url=${encodeURIComponent(blobUrl)}&embedded=true;
const pdfConversionUrl = https://view.officeapps.live.com/op/view.aspx?src=${encodeURIComponent(blobUrl)};

Third way --- converted docx to html page its working but docx design is not good i used some other third party package