ZenphotoCMS Forum
Zenphoto as an archive for text documents? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Zenphoto as an archive for text documents? (/thread-4547.html)



Zenphoto as an archive for text documents? - Grenoli - 2009-01-27

Hi

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




Zenphoto as an archive for text documents? - sbillard - 2009-01-27

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.




Zenphoto as an archive for text documents? - olihar - 2009-01-28

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);
`