API chuyển đổi tệp
Một API đơn giản để chuyển đổi tệp từ ứng dụng của bạn: hơn 200 định dạng, tài liệu tuyệt vời, nhóm hỗ trợ
Định giá
Khóa API cá nhân của bạn
Đăng ký miễn phí để nhận Khóa API
Employees of these companies use our service
SDKs
Đối với API v2, có sẵn PHP và Bản mô tả chính thức.
<?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