简体   繁体   中英

How to display uploaded doc (ms word) & PDF in browser Spring MVC

I designed a spring MVC application where User can upload doc or pdf files to application and it will be stored in My SQL.

I made download link so that user can download the uploaded file and it works fine.

How could we make it readable online (without downloading) in User's browser(like www.scribd.com )? (As of now I made tag <embed src="${pageContext.request.contextPath}/ebook/${ebook.filename}" width="1000" height="2000" /> tag in HTML, PDF views perfect as PDF reader is installed in PCand PDF plugin is installed in browser but doc file not displayed)

Here he says browsers doesn't support viewing PDF files.(even .doc files)

Is there any plugins do render uploaded doc/pdf files in the browser to be read online?

请访问http://viewerjs.org,我仅对PDF进行了最少的尝试(它似乎可以正常工作),但他们也宣传能够渲染Office文档的功能。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM