The Artima Developer Community
Sponsored Link

Java Answers Forum
converting html form in a MS Word document

4 replies on 1 page. Most recent reply: Nov 20, 2002 4:30 AM by Ana

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 4 replies on 1 page
Ana

Posts: 12
Nickname: anika
Registered: Aug, 2002

converting html form in a MS Word document Posted: Nov 19, 2002 1:35 AM
Reply to this message Reply
Advertisement
Hi all,

I am developing a web application with HTML, and JSP. The user has to fill in some fields, internally there is some data base look up and in the end I get a filled up form which has to be converted in a MS Word document.
Does anybody know if there are any classes to do so?

Thanks,
Ana


Rahul

Posts: 52
Nickname: wildhorse
Registered: Oct, 2002

Re: converting html form in a MS Word document Posted: Nov 19, 2002 3:46 AM
Reply to this message Reply
With ms-word2K you have the facility of opening any html file. you might consider writing the contents of the url (of the filled up form) into a file naming it *.html and then open it with ms-word2K and check.

Ana

Posts: 12
Nickname: anika
Registered: Aug, 2002

Re: converting html form in a MS Word document Posted: Nov 19, 2002 8:18 AM
Reply to this message Reply
The thing is that I have to do it programatically and the look of the Word file has to be exactly the same as that of the HTML form.

Matt Gerrans

Posts: 1153
Nickname: matt
Registered: Feb, 2002

Re: converting html form in a MS Word document Posted: Nov 19, 2002 9:29 AM
Reply to this message Reply
Unfortunately, "MS Word Format" is not an open format. It is always a moving target, in any case. What version of Word format do you want to write? What is wrong with the idea of saving html? Word can open that file as if it were a .doc file. You could save as .rtf, which Word could also open, but what is the point of all that extra work? It will be especially difficult to get the same look in Word, because it is a complicated transformation. html and Word techniques of formatting differ quite a bit, so there are a lot of tricks thrown in to try (and fail!) to get the same look -- just save a simple Word document to html and you'll see what a big complicated mess of html results.

Anyway, probably the most feasible approach, if you must do this, is to find a third-party tool that does this, or something like it. There are probably html-to-rtf tools, at least and some of the old Word formats are probably well-known enough that you could, for instance, create Word 2.0 files...

Ana

Posts: 12
Nickname: anika
Registered: Aug, 2002

Re: converting html form in a MS Word document Posted: Nov 20, 2002 4:30 AM
Reply to this message Reply
Thanks a lot. It?s a good advice.

Ana

Flat View: This topic has 4 replies on 1 page
Topic: compress/decompress using gzip Previous Topic   Next Topic Topic: How to retrieve records based on muliple columns using CMR?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use