Jump to content

wvware (anyone use it?)


Jocka

Recommended Posts

I just started using this on a server of mine to convert doc files to html. The only thing I can't figure out how to do is instead of creating a HTML file, I just want the output. If anyone has used wvware, maybe you can help.

This is the format to make it work "wvHtml .docfile .htmlfile"
One thing we tried when executing was "wvHtml $thisdoc /dev/stdout" but it's calling dev a directory. As I understand, this should just echo out the information if it were in a php like this:
[code]
<?php

$newDoc = system('wvHtml $thisdoc /dev/stdout');
echo $newDoc;

?>
[/code]
Link to comment
Share on other sites

I dont know about wvware - but if you set the headers on a html page to be a word document - Microsoft Word will convert it to a *.doc for you -)

Here is how to set the headers:
    header("Content-disposition: filename=your_file.doc");
    header("Content-type: application/msword");

And MS word should handle that page then.

-steve
Link to comment
Share on other sites

The problem isn't creating .doc files. I can do that with ease. The problem was reading doc files created in microsoft word or openoffice (the 2 main programs). It seems to do a decent job doing it but like I said. I have to upload the .doc file, then convert it to an html file, then read the html file, then delete the html file. All I was looking for was a way to convert it from .doc to html (not an html file) and output the information. This way I could do this : $string = system('wvHtml this.doc output');
Then I could just throw all the output into a string. It works within the Linux shell environment to use /dev/stdout but not in the php "System" function.
Link to comment
Share on other sites

Ah! Apologies.

Why not get the "catdoc" application? Its available for linux (and a debian package :-) ). It can be called via the cmdline or system(). Do you need graphics and all that - or just the text however. It would be very difficult to replicate a doc as a html page in my opinion. Anyways take a look at catdoc - if you just need the text etc.

http://freshmeat.net/projects/catdoc/
http://www.45.free.net/~vitus/software/catdoc/
Link to comment
Share on other sites

if the need for just the text content is all, then that gives you a few solutions. as steve said, there's catdoc. also:
1, antiword (free) - http://www.winfield.demon.nl/
2, phpWordLib (costs) - http://www.phpwordlib.motion-bg.com/
3, i wrote a class that will strip out the text from a word file. it's a bit messy, but it works perfectly. PM me and i'll send it you
Link to comment
Share on other sites

I'm going to check all these out. I've been trying to figure this out for a few weeks now.
Cat doc looks promising so I'm gonna look into it a little bit more.

Any more suggestions as well? My boss now says it's ok to just get text. wvWare got all of the formatting but I explained to my boss that it would be easy to find a substitute for this if all else fails but it would have to be text only. He said ok so i'm good to go. :)
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.