PHP code example of ascteam / pdf-version-converter
1. Go to this page and download the library: Download ascteam/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/ */
ascteam / pdf-version-converter example snippets
$contentConverted = (new \AscTeam\PDFVersionConverter\PdfVersionConverter)->convertTo14(file_get_contents($filename));
$version = (new \AscTeam\PDFVersionConverter\PdfVersionConverter)->guess(file_get_contents($filename));
// import the composer autoloader
ersionConverter\Guesser\RegexGuesser;
// [..]
$guesser = new RegexGuesser();
echo $guesser->guess('/path/to/my/file.pdf'); // will print something like '1.4'
// import the composer autoloader
onent\Filesystem\Filesystem,
AscTeam\PDFVersionConverter\Converter\GhostscriptConverterCommand,
AscTeam\PDFVersionConverter\Converter\GhostscriptConverter;
// [..]
$command = new GhostscriptConverterCommand();
$filesystem = new Filesystem();
$converter = new GhostscriptConverter($command, $filesystem);
$converter->convert('/path/to/my/file.pdf', '1.4');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.