PHP code example of ottosmops / office2text

1. Go to this page and download the library: Download ottosmops/office2text library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

ottosmops / office2text example snippets


use Ottosmops\Office2text\Extract;

$text = (new Extract())
  ->document('example.docx')
  ->text();

$text = Extract::getText('example.docx');