[PHP] RE: Can php convert doc to HTML?

2006-05-24 Thread Finner, Doug
On 5/23/06, Martin Alterisio [EMAIL PROTECTED] wrote:

 If that's the case, why don't you just use the export as web page or

 save as web page tools of MS Word (if you don't have it anymore you 
 can as someone who still has it, or I think OpenOffice also has a
similar tool).


 Because there are 200 of them.

 Dotan Cohen

Unless you want to do them one at a time, you'll need to write code.
Unless this is something that you need to do a lot, why not write the
code using OOo's programming language?  Seems like all the appropriate
hooks should be there to pull in each Word doc, push it off as HTML, and
repeat for all the docs.  I haven't worked with OOo for programming, but
it might be worth a look.  Hit the OOo site and see what their forums
have to offer.

Doug
___
This e-mail message has been sent by Kollsman, Inc. and is for the use
of the intended recipients only. The message may contain privileged
or confidential information. If you are not the intended recipient
you are hereby notified that any use, distribution or copying of
this communication is strictly prohibited, and you are requested to
delete the e-mail and any attachments and notify the sender immediately.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] RE: Can php convert doc to HTML?

2006-05-24 Thread André Medeiros

So, here's what you need.

http://ftp.45.free.net/pub/catdoc/catdoc-0.94.2.zip

This converts doc files to .txt, although I'm not sure that it will
keep the format intact.

Take care.

On 5/24/06, Finner, Doug [EMAIL PROTECTED] wrote:

On 5/23/06, Martin Alterisio [EMAIL PROTECTED] wrote:

 If that's the case, why don't you just use the export as web page or

 save as web page tools of MS Word (if you don't have it anymore you
 can as someone who still has it, or I think OpenOffice also has a
similar tool).


 Because there are 200 of them.

 Dotan Cohen

Unless you want to do them one at a time, you'll need to write code.
Unless this is something that you need to do a lot, why not write the
code using OOo's programming language?  Seems like all the appropriate
hooks should be there to pull in each Word doc, push it off as HTML, and
repeat for all the docs.  I haven't worked with OOo for programming, but
it might be worth a look.  Hit the OOo site and see what their forums
have to offer.

Doug
___
This e-mail message has been sent by Kollsman, Inc. and is for the use
of the intended recipients only. The message may contain privileged
or confidential information. If you are not the intended recipient
you are hereby notified that any use, distribution or copying of
this communication is strictly prohibited, and you are requested to
delete the e-mail and any attachments and notify the sender immediately.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Dotan Cohen

On 5/23/06, Jay Blanchard [EMAIL PROTECTED] wrote:

[snip]
This may be far-fetched, but can php convert a doc file to HTML?
[/snip]

http://www.google.com/search?hl=enq=php+convert+word+doc+to+html



Thanks, Jay. I mostly found Windows software on google that would do
the job. So I decided to roll my own- but being the non-programmer
that I am I would have to do it in php. I was half expecting to find
that $html_code=doc_to_html($filename); would do it! Of course, that
would run with make_coffee(black) running in the background...

Dotan


[PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Dotan Cohen

On 5/23/06, tedd [EMAIL PROTECTED] wrote:

At 7:09 PM +0300 5/23/06, Dotan Cohen wrote:
This may be far-fetched, but can php convert a doc file to HTML? I
vaguely remember a thread that discussed converting pdf's, but I
cannot find reference to either that or to doc in the manual. Any
input would be appreciated.

If php cannot do this, then could someone recommend a tool that runs
on linux that can do the conversion in batch? I have ~200 files to
convert.

Thanks.

Dotan Cohen

Dotan:

What kind of documents and how to do want to present them?

PHP can generate html code and place any text file within in it --
it's simple a matter of arranging things the way you want it to look.
For example, you might want to review:

http://www.weberdev.com/get_example-1233.html

In fact, you can do that without php by using a shtml and includes.

But, more specifically, I need to know more about what documents you
have and you what you want to do with them.

tedd


Thanks for the example, Tedd. That script would work if I already had
the files in HTML format.

I have about two hundred .doc files that I have archived over the
years. Now that I'm rid of windows I would still like to use them. I
figure that the easiest way to still view the documents, and make them
available for others in my faculty, would be to publish them on
dotancohen.com . However, I'd need to convert them from .doc format to
HTML before I can put them on the web.

I know that I can just drag it all over to a winbox at the university
and convert them one-by-one in Word, but I'd rather not do that to 200
individual files!

Dotan Cohen
http://gmail-com.com
56


Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio

2006/5/23, Dotan Cohen [EMAIL PROTECTED]:


On 5/23/06, tedd [EMAIL PROTECTED] wrote:
 At 7:09 PM +0300 5/23/06, Dotan Cohen wrote:
 This may be far-fetched, but can php convert a doc file to HTML? I
 vaguely remember a thread that discussed converting pdf's, but I
 cannot find reference to either that or to doc in the manual. Any
 input would be appreciated.
 
 If php cannot do this, then could someone recommend a tool that runs
 on linux that can do the conversion in batch? I have ~200 files to
 convert.
 
 Thanks.
 
 Dotan Cohen

 Dotan:

 What kind of documents and how to do want to present them?

 PHP can generate html code and place any text file within in it --
 it's simple a matter of arranging things the way you want it to look.
 For example, you might want to review:

 http://www.weberdev.com/get_example-1233.html

 In fact, you can do that without php by using a shtml and includes.

 But, more specifically, I need to know more about what documents you
 have and you what you want to do with them.

 tedd

Thanks for the example, Tedd. That script would work if I already had
the files in HTML format.

I have about two hundred .doc files that I have archived over the
years. Now that I'm rid of windows I would still like to use them. I
figure that the easiest way to still view the documents, and make them
available for others in my faculty, would be to publish them on
dotancohen.com . However, I'd need to convert them from .doc format to
HTML before I can put them on the web.

I know that I can just drag it all over to a winbox at the university
and convert them one-by-one in Word, but I'd rather not do that to 200
individual files!

Dotan Cohen
http://gmail-com.com
56



If that's the case, why don't you just use the export as web page or save
as web page tools of MS Word (if you don't have it anymore you can as
someone who still has it, or I think OpenOffice also has a similar tool).


[PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread tedd

Thanks for the example, Tedd. That script would work if I already had
the files in HTML format.


Try searching the site using html, I found 85 examples that did 
something with html and php.


Searching Google, presented this:

http://www.needscripts.com/Resource/15472.html

That's another source too.


I have about two hundred .doc files that I have archived over the
years. Now that I'm rid of windows I would still like to use them. I
figure that the easiest way to still view the documents, and make them
available for others in my faculty, would be to publish them on
dotancohen.com . However, I'd need to convert them from .doc format to
HTML before I can put them on the web.

I know that I can just drag it all over to a winbox at the university
and convert them one-by-one in Word, but I'd rather not do that to 200
individual files!

Dotan Cohen


If you were on a Mac, you could batch change the doc's into html 
pretty easily using AppleScript. You know that Word can save doc's 
directly to html.


tedd
--

http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Dotan Cohen

On 5/23/06, Martin Alterisio [EMAIL PROTECTED] wrote:


If that's the case, why don't you just use the export as web page or save
as web page tools of MS Word (if you don't have it anymore you can as
someone who still has it, or I think OpenOffice also has a similar tool).



Because there are 200 of them.

Dotan Cohen
http://what-is-what.com
323


Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio

2006/5/23, Dotan Cohen [EMAIL PROTECTED]:


On 5/23/06, Martin Alterisio [EMAIL PROTECTED] wrote:

 If that's the case, why don't you just use the export as web page or
save
 as web page tools of MS Word (if you don't have it anymore you can as
 someone who still has it, or I think OpenOffice also has a similar
tool).


Because there are 200 of them.

Dotan Cohen
http://what-is-what.com
323




Open file, choose file, save as web page, close file ~ 2 minutes
200 files * 2 minutes = 400 minutes ~ 7 hours
How much hours have you wasted looking for a php script?

Anyway, I understand... it's a pain in the ass. Whay you're doing wrong is:
you have turned your solution into a problem and forgot what the real
problem was.

Why don't look for another solution:
http://www.google.com/search?q=batch+convert+word+to+html
But they'll probably ask money for it, so why don't just:
http://www.google.com/search?q=batch+convert+word+to+html+free


Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Jochem Maas

my 2cents 

Martin Alterisio wrote:

2006/5/23, Dotan Cohen [EMAIL PROTECTED]:



On 5/23/06, Martin Alterisio [EMAIL PROTECTED] wrote:

 If that's the case, why don't you just use the export as web page or
save
 as web page tools of MS Word (if you don't have it anymore you can as
 someone who still has it, or I think OpenOffice also has a similar
tool).


Because there are 200 of them.

Dotan Cohen
http://what-is-what.com
323




Open file, choose file, save as web page, close file ~ 2 minutes
200 files * 2 minutes = 400 minutes ~ 7 hours
How much hours have you wasted looking for a php script?


even if it takes him 14 hours to find a script and get it working
he will have:

a, learnt quite abit about php'ing/html/etc
b, have the basis for a tool that can convert any future .doc
files that he finds/get thrown at him.

Martin the suggestion you give sucks because it doesn't empower,
it leaves Dotan with a sore wrist and no gain in knowledge...

maybe it's  good advice for 'noobs' on an Office mailing
but this is a lsit about programming (sure it's php and plenty of IT
related people consider us phpers to be the pretty much the lowest form
of programmer - well not as low as VBscripters ;-) - anyone reading, posting
here, I would hope, aspires to a little more than PHB's secretary with
regards to their IT skills.




Anyway, I understand... it's a pain in the ass. Whay you're doing wrong is:
you have turned your solution into a problem and forgot what the real
problem was.


this assumes there is a 'problem' - maybe Dotan is driven more or less
by a desire to see if he can do it rather than being up against some deadline
or having his boss breathing down his neck waiting for a result?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Martin Alterisio

2006/5/23, Jochem Maas [EMAIL PROTECTED]:


my 2cents 

Martin Alterisio wrote:
 2006/5/23, Dotan Cohen [EMAIL PROTECTED]:


 On 5/23/06, Martin Alterisio [EMAIL PROTECTED] wrote:
 
  If that's the case, why don't you just use the export as web page
or
 save
  as web page tools of MS Word (if you don't have it anymore you can
as
  someone who still has it, or I think OpenOffice also has a similar
 tool).
 

 Because there are 200 of them.

 Dotan Cohen
 http://what-is-what.com
 323



 Open file, choose file, save as web page, close file ~ 2 minutes
 200 files * 2 minutes = 400 minutes ~ 7 hours
 How much hours have you wasted looking for a php script?

even if it takes him 14 hours to find a script and get it working
he will have:

a, learnt quite abit about php'ing/html/etc
b, have the basis for a tool that can convert any future .doc
files that he finds/get thrown at him.

Martin the suggestion you give sucks because it doesn't empower,
it leaves Dotan with a sore wrist and no gain in knowledge...

maybe it's  good advice for 'noobs' on an Office mailing
but this is a lsit about programming (sure it's php and plenty of IT
related people consider us phpers to be the pretty much the lowest form
of programmer - well not as low as VBscripters ;-) - anyone reading,
posting
here, I would hope, aspires to a little more than PHB's secretary with
regards to their IT skills.



You're completely right about that. Maybe living too much at the edge of the
deadline has turned me into boring freak (most probably). I have to take
this way of thinking out my mind.



 Anyway, I understand... it's a pain in the ass. Whay you're doing wrong
is:
 you have turned your solution into a problem and forgot what the real
 problem was.

this assumes there is a 'problem' - maybe Dotan is driven more or less
by a desire to see if he can do it rather than being up against some
deadline
or having his boss breathing down his neck waiting for a result?



I disagree. There is always a problem, the kind of problem you're referring
to is I'm lacking this knowledge, or I want to know how to do X, in his
case X would be converting word docs to html with a php script.

My first impression was that this was his problem, but deducing from what he
explained after, I'm certain this isn't the problem he wants to solve, but
rather a solution he came up but is unable to put into practice.

I think this time PHP is not the solution. A shell script interacting with a
third party tool, or a C program interacting with a third party library will
be a much more appropiate solution.


Re: [PHP] Re: Can php convert doc to HTML?

2006-05-23 Thread Dotan Cohen

On 5/24/06, Martin Alterisio [EMAIL PROTECTED] wrote:

2006/5/23, Jochem Maas [EMAIL PROTECTED]:

 my 2cents 

 Martin Alterisio wrote:
  2006/5/23, Dotan Cohen [EMAIL PROTECTED]:
 
 
  On 5/23/06, Martin Alterisio  [EMAIL PROTECTED] wrote:
  
   If that's the case, why don't you just use the export as web page
or
  save
   as web page tools of MS Word (if you don't have it anymore you can
as
   someone who still has it, or I think OpenOffice also has a similar
  tool).
  
 
  Because there are 200 of them.
 
  Dotan Cohen
  http://what-is-what.com
  323
 
 
 
  Open file, choose file, save as web page, close file ~ 2 minutes
  200 files * 2 minutes = 400 minutes ~ 7 hours
  How much hours have you wasted looking for a php script?

 even if it takes him 14 hours to find a script and get it working
 he will have:

 a, learnt quite abit about php'ing/html/etc
 b, have the basis for a tool that can convert any future .doc
 files that he finds/get thrown at him.

 Martin the suggestion you give sucks because it doesn't empower,
 it leaves Dotan with a sore wrist and no gain in knowledge...

 maybe it's  good advice for 'noobs' on an Office mailing
 but this is a lsit about programming (sure it's php and plenty of IT
 related people consider us phpers to be the pretty much the lowest form
 of programmer - well not as low as VBscripters ;-) - anyone reading,
posting
 here, I would hope, aspires to a little more than PHB's secretary with
 regards to their IT skills.


You're completely right about that. Maybe living too much at the edge of the
deadline has turned me into boring freak (most probably). I have to take
this way of thinking out my mind.

 
  Anyway, I understand... it's a pain in the ass. Whay you're doing wrong
is:
  you have turned your solution into a problem and forgot what the real
  problem was.

 this assumes there is a 'problem' - maybe Dotan is driven more or less
 by a desire to see if he can do it rather than being up against some
deadline
 or having his boss breathing down his neck waiting for a result?


I disagree. There is always a problem, the kind of problem you're referring
to is I'm lacking this knowledge, or I want to know how to do X, in his
case X would be converting word docs to html with a php script.

My first impression was that this was his problem, but deducing from what he
explained after, I'm certain this isn't the problem he wants to solve, but
rather a solution he came up but is unable to put into practice.

I think this time PHP is not the solution. A shell script interacting with a
third party tool, or a C program interacting with a third party library will
be a much more appropiate solution.



Jochem, Martin,
I had considered the prospect of converting the documents one by one.
As Jochem had mentioned, time is not the only factor- I need a method,
not a solution. Even if there were 20 instead of two hunderd it would
be worth my while to learn to deal with them in an automated fashion.

I do agree that a bash script or C would be better suited to this. Too
bad I don't know either language. I am not in CS, I am in mechanical
engineering, but I am willing to learn. However, sometimes solutions
come before learning, so I decided to try a language that I at least
have a handle on. In any case, just as php has Simple XML functions
and a thousand other time-savers, I had hope that there would already
be a function or class that solves my problem.

Thanks, guys. I will check out wvware and see where it leads me. I
appreciate the advise!

Dotan Cohen
http://technology-sleuth.com
02