我愿意在浏览器中显示docx文件作为预览和打印选项的建议. Pdf转换似乎是最有前途的,但是我遇到了格式问题.任何想法都欢迎! 解决方案尝试使用 http: //converter-eval.plutext.com/viewer.html将其视为Alpha级预览.我们尚未发布它,但是您可以将其托管在防火墙后面.恐怕它不是开源的,我们仍在制定价格(以及是否/如何提供免费版本). I'm using docx4j to convert a microsoft word document into a pdf then displaying it in a browser http://www.docx4java.org/trac/docx4j and it works well for a preview. The problem I'm facing is that this conversion loses most of the microsoft word document formatting. Page breaks and fonts don't transfer into the PDF format properly and even though I'm using standard font types docx4j doesn't come with them. In a Linux Tomcat hosted scenario fonts are not found and throw exceptions as it falls back to sans serif or other generic types.I have found this Microsoft tool to make documents render online, but I'm behind a firewall so I cannot include this tool as an option: https://products.office.com/en-us/office-online/view-office-documents-onlineI'm open to suggestion on displaying a docx file as a preview and print option from within a browser. Pdf conversion appears to be the most promising, but I run into formatting issues.Any ideas are welcome! 解决方案 Have a play with http://converter-eval.plutext.com/viewer.htmlConsider it an alpha level preview. We haven't quite released it yet, but you will be able to host it behind a firewall.It isn't open source, I'm afraid, and we're still working out pricing (and whether/how there could be a free edition). 这篇关于在浏览器中渲染docx文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-05 12:44
查看更多