PHP code example of raphaelramosds / pdf-to-txt
1. Go to this page and download the library: Download raphaelramosds/pdf-to-txt 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/ */
raphaelramosds / pdf-to-txt example snippets
$ptt = new PdfToTxt('path/to/file.pdf', 'path/to/txt', 'file');
$ptt->convert();
bash
# Install
sudo apt install imagemagick php-imagick
# Enable imagick extension
sudo phpenmod imagick
# (Optional) Check if it is enabled
php -m | grep imagick