Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/blazingdocs/blazingdocs-php
BlazingDocs PHP client
https://github.com/blazingdocs/blazingdocs-php
api csv doc document-generation documents docx json mail-merge odt pdf reports templates xml
Last synced: 16 days ago
JSON representation
BlazingDocs PHP client
- Host: GitHub
- URL: https://github.com/blazingdocs/blazingdocs-php
- Owner: blazingdocs
- License: mit
- Created: 2021-08-09T14:35:22.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-07T12:11:54.000Z (about 3 years ago)
- Last Synced: 2024-11-14T15:13:18.920Z (3 months ago)
- Topics: api, csv, doc, document-generation, documents, docx, json, mail-merge, odt, pdf, reports, templates, xml
- Language: PHP
- Homepage: https://blazingdocs.com
- Size: 60.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BlazingDocs PHP client
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
```php
$client = new \BlazingDocs\BlazingClient('API-KEY');
```### Getting account info
```php
$account = $client->getAccount();
```### Getting merge templates list
```php
$templates = $client->getTemplates();
```### Getting usage info
```php
$usage = $client->getUsage();
```### Executing merge
```php
$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