Zenphoto as an archive for text documents?

Hi

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

Comments

  • 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.
  • 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);
    `
Sign In or Register to comment.