PHP code example of peronh / pdf-compress
1. Go to this page and download the library: Download peronh/pdf-compress 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/ */
peronh / pdf-compress example snippets
// Import Class
use Peronh\PDFCompress\PDFCompress;
// and now you can use library
$pdf = new PDFCompress();
$pdf->AddFile('path/to/source_pdf_file.pdf');
$pdf->CompressFile('path/to/dest_pdf_file.pdf', 'default_ebook');