PHP code example of anton-am / pdf-version-converter
1. Go to this page and download the library: Download anton-am/pdf-version-converter 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/ */
anton-am / pdf-version-converter example snippets
// import the composer autoloader
FVersionConverter\Guesser\RegexGuesser;
// [..]
$guesser = new RegexGuesser();
echo $guesser->guess('/path/to/my/file.pdf'); // will print something like '1.4'
// import the composer autoloader
mponent\Filesystem\Filesystem,
AntonAm\PDFVersionConverter\Converter\GhostscriptConverterCommand,
AntonAm\PDFVersionConverter\Converter\GhostscriptConverter;
// [..]
$command = new GhostscriptConverterCommand();
$filesystem = new Filesystem();
$converter = new GhostscriptConverter($command, $filesystem);
$converter->convert('/path/to/my/file.pdf', '1.4');