blazingdocs / blazingdocs-php
v1.0.0
2021-08-21 08:20 UTC
Requires
- php-http/client-common: ^2.4
- php-http/multipart-stream-builder: ^1.2
- phpdocumentor/reflection-docblock: ^5.2
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- symfony/property-access: ^5.3
- symfony/property-info: ^5.3
- symfony/serializer: ^5.3
Requires (Dev)
- laminas/laminas-diactoros: ^2.6
- php-http/curl-client: ^2.2
This package is auto-updated.
Last update: 2025-03-21 18:31:20 UTC
README
High-performance document generation API. Generate documents and reports from СSV, JSON, XML with 99,9% uptime and 24/7 monitoring.
Installation
Run this line from Terminal:
composer require blazingdocs/blazingdocs-php
Integration basics
Setup
You can get your API Key at https://app.blazingdocs.com
$client = new \BlazingDocs\BlazingClient('API-KEY');
Getting account info
$account = $client->getAccount();
Getting merge templates list
$templates = $client->getTemplates();
Getting usage info
$usage = $client->getUsage();
Executing merge
$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);
Documentation
See more details here https://docs.blazingdocs.com