Forum OpenACS Q&A: displaying Word documents directly

Collapse
Posted by David Kuczek on
Does anyone have experience with tools that make it possible to
display Word documents within a page?

I don't mean the way file-storage does it (it basically checks if you
have Word installed and then frames it inside the browser). I would
like people to look at the document with all its pictures and graphs
etc. without needing Word.

Another thing that I would like to implement is an easy way to
display mathematical functions. Is there any free software students
can use to write down math related content? And then could I
integrate their documents the way I want to do it with the Word
documents?

If there is a free tool for those things, I could try to integrate it
with file-storage... if I make it 😊

Collapse
Posted by Carl Coryell-Martin on
We had succes integrating wvWare into our forthcoming knowldedge management system. You can see wvWare in action at FreeViewer.com.

As for displaying mathematical functions, I would suggest that you start exploring the wide and wonderful world of LaTeX. There are several LaTeX to html converters that produce passable representation of math content. Search for LaTeX on google for more information. LaTeX is another document markup language based on free tools, I'll warn you though that full mastery can take a lifetime.

Cheers,

Collapse
Posted by David Kuczek on
Hello Carl,

I have been to freeviewer.com and to wvware.com... They look very interesting, thanks.

wvware tells you that they mainly convert word into html. How does freeviewer.com convert Powerpoint, Excell etc. into html? Do you use any other conversion tools within your knowledge management project.

By the way. I was working as an intern for Siemens Sharenet in Munich. Right now I am working on an KM project for an old German bank and on a free KM-system for students in Germany.

I would like to have a look at what you produced. I might use some code with my own project (if you let me 😊) and help you with some KM-experience...

Collapse
Posted by Dave Bauer on
Check out MathML http://www.w3.org/Math/ a proposed markup standard for math notation.
Collapse
Posted by Sam Snow on
What about converting the Word, Excel, etc. documents to Adobe PDF format and displaying them this way? Using frames, this can work pretty well (see the catalog at http://www.mcmaster.com/)

A copy of the Adobe Acrobat Writer is not too steep in price ($250 for 5.0), and from my personal experience with version 4.0, works very well. They also have a web site, http://192.150.14.203/, which will allow you to make a couple of PDF files for free and try things out.

I seem to remember some commercial plug-in that allowed you to display excel files in-line; I'll have to take a look.

Collapse
Posted by Lachlan Myers on
wvware is pretty cool. It doesn't always work (version 6.0)for complex tables, and multi-level indents can be strange. I was converting from Word 9 (Office 2000) documents with tables and graphics in landscape to HTML. Embedded grahics in regular formats seemed to convert OK (with some changes in relative size).
Collapse
Posted by Daniël Mantione on
I have used antiword (http://www.antiword.org) in a site I made. The visitors can view a document in text or pdf format. The results are surprisingly good.

Here's the code I used in that site:

if {$type_srcfile == "application/msword"} {
  if {$desttype == "text/plain"} {
    set tmp_destfile "$tmp_filename.txt"
 
    exec $appdir/antiword -m /usr/local/lib/antiword/8859-1.txt 
     -t $srcfile >$tmp_destfile
 
    #ns_returnfile $conn 200 "text/plain" $tmp_destfile
    ns_respond -status 200 -type "text/plain" -file $tmp_destfile
 
    ns_unlink $tmp_destfile
  } elseif {$desttype == "application/pdf"} {
    set tmp_tmp "$tmp_filename.ps"
    set tmp_destfile "$tmp_filename.pdf"
 
    exec "$appdir/antiword" -m 
     /usr/local/lib/antiword/8859-1.txt -p a4 $srcfile ">$tmp_tmp"
    exec gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite 
     -sOutputFile=$tmp_destfile -c save pop -f
    #ns_returnfile $conn 200 "application/pdf" $tmp_destfile
    ns_respond -status 200 -type "application/pdf" -file 
     $tmp_destfile
 
    ns_unlink $tmp_tmp
    ns_unlink $tmp_destfile
  } else {
    ns_log Notice "Sessie: $si Opgevraagd: $srcfile Formaat: 
$desttype"
    ns_returnnotfound
  }      if {$type_srcfile == "application/msword"} {
  if {$desttype == "text/plain"} {
    set tmp_destfile "$tmp_filename.txt"

    exec $appdir/antiword -m  /usr/local/lib/antiword/8859-1.txt 
     -t $srcfile >$tmp_destfile
 
    #ns_returnfile $conn 200 "text/plain" $tmp_destfile
    ns_respond -status 200 -type "text/plain" -file $tmp_destfile
 
    ns_unlink $tmp_destfile
  } elseif {$desttype == "application/pdf"} {
    set tmp_tmp "$tmp_filename.ps"
    set tmp_destfile "$tmp_filename.pdf"
 
    exec "$appdir/antiword" -m /usr/local/lib/antiword/8859-1.txt 
     -p a4 $srcfile ">$tmp_tmp"
    exec gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite 
      -sOutputFile=$tmp_destfile -c save pop -f
    #ns_returnfile $conn 200 "application/pdf" $tmp_destfile
    ns_respond -status 200 -type "application/pdf" -file 
     $tmp_destfile
 
    ns_unlink $tmp_tmp
    ns_unlink $tmp_destfile
  } else {
    ns_log Notice "Sessie: $si Opgevraagd: $srcfile Formaat: 
$desttype"
    ns_returnnotfound
  }
Collapse
Posted by Daniël Mantione on
Hmmm. It seems that my post shows two bugs in OpenACS:
  • my name does not appear properly (Daniël)
  • all backslashes have vanished
Collapse
Posted by Sam Snow on
About the Excel plug-in, I had things backwards. I found the software-- SoftArtisans ExcelWriter, http://www.softartisans.com/excelwriter.html -- but it takes info and creates excel documents.

Not what you were looking for, but interesting...

Collapse
Posted by Rafael Calvo on
There is a research group at Carnegie Mellon that works on this subject. They have an online converter called Tom It might help.. I do not know if thir code is available.
Collapse
Posted by Michael Feldstein on
A beta version of Carnegie Mellon's TOM source code is
available: http://tom.library.upenn.edu/sw/index.html