pogodoc / pogodoc-php
Installs: 20
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
pkg:composer/pogodoc/pogodoc-php
Requires
- guzzlehttp/guzzle: ^7.9
- vlucas/phpdotenv: ^5.6
README
The Pogodoc PHP SDK enables developers to seamlessly generate documents and manage templates using Pogodoc’s API.
Installation
To install the PHP SDK, just execute the following command
$ composer require pogodoc/pogodoc-php
Setup
To use the SDK you will need an API key which can be obtained from the Pogodoc Dashboard
Example
<?php require __DIR__ . '/vendor/autoload.php'; use PogodocSdk\PogodocSdk; $client = new PogodocSdk("YOUR_POGODOC_API_TOKEN"); $response = $client->generateDocument([ 'templateId' => "your-template-id", 'data' => ["name" => "John Doe"], 'renderConfig' => [ 'type' => 'html', 'target' => 'pdf', 'formatOpts' => [ 'fromPage' => 1, ], ], ]); printf("Generated document url:\n %s\n", $response->output->data->url);
License
MIT License