PHP code example of nilgems / laravel-textract

1. Go to this page and download the library: Download nilgems/laravel-textract 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/ */

    

nilgems / laravel-textract example snippets

.ini

# Run the extractor
$output = Textract::run('/path/to/file.extension');

# Display the extracted text
echo $output->text;

# Display the extracted text word count
echo $output->word_count;

# Display the extracted text with direct string conversion
echo (string) $output;
app.php

  'providers' => [
    ...
    Nilgems\PhpTextract\Providers\ServiceProvider,
    ...
  ]
  
app.php

  php artisan vendor:publish --tag=textract
  
memory_limit