Junior Member
Junior Member
Grenoli   2009-01-27, 16:11
#1

Hi

Is it possible to use Zenphoto as an archive for documents written in Word?

Member
Member
sbillard   2009-01-27, 18:22
#2

There is no current support for DOC formatted items. Such support would be possible by adding a class plugin that could format the documents.

There is an example in class-textobject.php which will operate on .txt files. Of course, it would need to be enhanced to be able to format the DOC formatted files. That would probably require a PHP library that could handle the format.

Member
Member
olihar   2009-01-28, 15:11
#3

I did hear that from someone on another project before.. First changing .doc to a .txt then zen could read it.

`
$word = new COM("word.application") or die("Unable to instantiate Word");
$word->Documents->Open($filename);
$newfilename = substr($filename,0,-4) . “.txt”;

// the '2' parameter specifies saving in txt format
$word->Documents[1]->SaveAs($newfilena...
$word->Documents[1]->Close(false);
$word->Quit(); $word->Release();
$word = NULL;
unset($word);

$fh = fopen($newfilename, ‘r’);
$contents = fread($fh, filesize($newfilename));
fclose($fh);
unlink($new_filename);
`

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.