Forum Moderators: open

Message Too Old, No Replies

Html2word

how to put html text on a word document.

         

Morrison

11:09 pm on May 12, 2002 (gmt 0)

10+ Year Member



Hello,

I read the major topics about printing html pages and i decided that the only way of doing it right is to combine HTML and WORD.

what i want to do is to create a word document that will have the page layout that i want but no body text.

when i will click on "print" link from my HTML document, it will open the WORD file that i have created but with the text from my HTML page.

does anybody know how to transfer data from HTML to WORD ?

Thanx!

Morrison.

Lisa

11:19 pm on May 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ctrl-C
Ctrl-V

tbear

11:27 pm on May 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Lisa - you're on form today :)

Purple Martin

11:29 pm on May 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As an alternative to Lisa's Ctrl+V you'll find Edit > Paste Special works well if you want to control the amount formatting in the pasted text.

Morrison

11:32 pm on May 12, 2002 (gmt 0)

10+ Year Member



that's one way...

the thing is that the word document will be on the server and not on the client computer.

that's way i need the word document to automatcly open with the text in it when i press the link.

thanx,

Morrison

(edited by: Morrison at 11:47 pm (utc) on May 12, 2002)

Morrison

11:33 pm on May 12, 2002 (gmt 0)

10+ Year Member



I see you guys in a good mud... :)
It's 2:36 am here and i'm still working... :(

Duckula

4:45 am on May 13, 2002 (gmt 0)

10+ Year Member



"printing... the only way right... word..."
"will be on the server"

The most correct way to do that would be to convert the document to latex with html2latex, or better go the whole way and convert it to postscript, html2ps.

If you are on a 'nix server both are easily available.

Your client will need to be able to print postscript, of course; I think that Acrobat doesn't handle ps. There are some apps that do, but the client surely doesn't have them :)

As for the original question, at least on linux no html2word exists.

Morrison

11:53 am on May 13, 2002 (gmt 0)

10+ Year Member



What is "latex" & "postscript" ?

i'm working on a windows2k server.

thanx.

Duckula

1:29 am on May 14, 2002 (gmt 0)

10+ Year Member



Latex is a layout language; it compiles exactly how the page will look printed. It looks like this:

\usepackage[latin1]{inputenc}
\topmargin=10.mm
\oddsidemargin=0.mm
\evensidemargin=0.mm
\begin{document}
\begin{abstract}
Put your abstract here
\end{abstract}
Text here. {\bf bold text}.
\end{document}

but using it as a backend you don't have to worry about coding because it is all done on the server. Once compiled, it becomes a printer native format know as postscript, and is a pretty good way to print making sure that the layout is preserved.

But, as I said, surely the clients have not set a mime type to manage postscript.

Postscript is what you get when you tell the browser to "print as a file".

Morrison

3:36 am on May 14, 2002 (gmt 0)

10+ Year Member



Thanx.

Lisa

7:45 am on May 14, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, MS-Word is a com based program... You can create and populate a word document using COM. Both ASP and PHP support COM. (only the windows PHP version)

Take a look at this. [sourceforge.net...]

Morrison

9:45 am on May 14, 2002 (gmt 0)

10+ Year Member



OK.

I found half of the answer to my question and it's:


<%
Response.ContentType = "application/msword"
%>

at the page's head.

this will make the page a WORD document, instead of HTML document.

now, the other half that i couldn't find is:

how to "load" an exiting word document with the layout (i want each page to have a frame), and make the html text add in the document body.

thanx.

Morrison.