Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-11-2008, 12:19 AM
|
#1
|
|
Member
Registered: Oct 2003
Location: Mexico
Distribution: Ubuntu
Posts: 223
Rep:
|
using Java as web app, transform a word (.doc) document into JGP or HTML
Hello everyone:
I need to create a web application on java that can upload a word file (.doc) and the display it either as a image file, or HTML file. The doc file will have images, formatting, etc.
I've seen java apis such as POI, but it's quite limited regarding formatting.
I was thinking is there's a way to use the functionality of MS Word itself, somehow programmatically do a "save as html"
or maybe just upload it, and have a daemon on the server side that catches every doc file and transform it into image.... I haven't found anything like that tough
any ideas?
Thanks!
|
|
|
|
07-12-2008, 07:54 AM
|
#2
|
|
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2012.8, Slack1337 DebSqueeze, +50+ other Linux OS, for test only.
Posts: 11,762
|
Having "Abiword" installed the command
'abiword --to=html *.doc' or 'abiword --to=pdf *.doc'
will convert all .doc files in a directory.
(Starting Abiword is not necessary)
Try it, and see if the formatting is usable.
Regards
|
|
|
|
01-26-2009, 08:13 AM
|
#3
|
|
LQ Newbie
Registered: Jan 2009
Posts: 1
Rep:
|
java solution
A solution:
import officetools.OfficeFile;
...
FileInputStream fis = new FileInputStream(new File("test.html"));
FileOutputStream fos = new FileOutputStream(new File("test.pdf"));
OfficeFile f = new OfficeFile(fis,"localhost","8100", true);
f.convert(fos,"pdf");
All possible convertions:
html --> pdf
doc --> pdf, html, txt, rtf
xls --> pdf, html, csv
ppt --> pdf, swf
Library can be obtained from: dancrintea.ro/html-to-pdf/
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:53 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|