High-performance document generation API. Generate documents and reports from СSV, JSON, XML with 99,9% uptime and 24/7 monitoring.
Run this line from Terminal:
composer require blazingdocs/blazingdocs-php
You can get your API Key at https://app.blazingdocs.com
$client = new \BlazingDocs\BlazingClient('API-KEY');
$account = $client->getAccount();
$templates = $client->getTemplates();
$usage = $client->getUsage();
$client = new \BlazingDocs\BlazingClient('API-KEY');
$parameters = new \BlazingDocs\Parameters\MergeParameters();
$parameters->dataSourceType = \BlazingDocs\Utils\Constants::JSON_TYPE; # data in json format
$parameters->sequence = false; # data is object
$parameters->strict = true; # keep json types
$jsonFile = file_get_contents('PO-Template.json');
$streamFactory = Psr17FactoryDiscovery::findStreamFactory();
$content = $streamFactory->createStreamFromFile('PO-Template.docx', 'r');
$template = new \BlazingDocs\Utils\FormFile('PO-Template.docx', $content);
$data = $client->mergeWithFile($jsonFile, 'output.pdf', $parameters, $template);
See more details here https://docs.blazingdocs.com