开发者

Create a Word (.doc) file, convert it to PDF and HTML w/o opening Open Office port

开发者 https://www.devze.com 2023-02-10 11:21 出处:网络
I have a project which requires creating a Word (.doc) file with certain formatting and certain data fetched from my database. I want to output that file to user which he would edit and the upload the

I have a project which requires creating a Word (.doc) file with certain formatting and certain data fetched from my database. I want to output that file to user which he would edit and the upload the file back it back to the server. After which I want to perform the following conversion on the uploaded file.

  • .doc to .pdf (Intended to be downloaded and viewed on web)
  • .doc to .html (Intended for free text search on web)

I want to achieve this without opening the Open Office port. The earlier version was doing this but the port opened had tendency of crashing when the users are more. So I want to avoid doing that. The Open Office and the OS both were re-installed on other machines and tried in different ways but the OO port crashed every time the users increased.

Is there any ot开发者_如何学Goher way to achieve this conversion? Continuing with this is not possible due to the crashing.

This is the host machine:

  • Tomcat server on Linux (RedHat 64 bit)
  • The application is developed in Java (JSP and Servlets)
  • The backend is Oracle

All users have:

  • A Linux machine, mostly 32bit Fedora or Suse

Any help is appreciated.


You could use http://poi.apache.org/ for handling the actual .doc files. For PDF, there are a number of PDF libraries available as well. The catch is that many are not free, but here is a list of open source PDF libraries: http://java-source.net/open-source/pdf-libraries

Here is a discussion on Word to HTML. Convert Word doc to HTML programmatically in Java

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号