API konwersji plików
Jedno proste API do konwersji plików z Twojej aplikacji: ponad 200 formatów, świetna dokumentacja, zespół wsparcia
Cennik
Twój osobisty klucz API
Zarejestruj się za darmo, aby otrzymać Klucz API
Employees of these companies use our service
SDKs
Dla API v2 dostępne są oficjalne PHP i TypeScript.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiKey = 'myApiKey';
$client = new Webpractik\OcfConverter\Sdk\OcfClient($apiKey);
$filePath = '/path/to/file/to/convert.png';
$extensionToConvertTo = 'pdf';
try {
$task = $client->uploadFile($filePath, $extensionToConvertTo);
$result = $task->waitForConversion();
if ($result->isSuccess()) {
$resultUrl = $result->getResultingFileUrl();
$resultFileName = basename($resultUrl);
if (file_put_contents($resultFileName, file_get_contents($resultUrl))) {
$result->deleteFile();
}
}
} catch (Exception $e) {
echo 'Exception: ', $e->getMessage(), PHP_EOL;
}
What our customers say