PHP code example of risscsolutions / printformer-php-sdk
1. Go to this page and download the library: Download risscsolutions/printformer-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
risscsolutions / printformer-php-sdk example snippets
use Rissc\Printformer;
$config = [
'base_uri' => 'YOUR printformer URL',
'identifier' => 'YOUR TENANT IDENTIFIER',
'api_key' => 'YOUR TENANT API KEY',
];
$printformer = new Printformer($config);
$url = (string)$printformer->urlGenerator()->editor()
->draft($draft->getIdentifier())
->callback('https://YOUR-CALLBACK-URL-HERE')
->callbackCancel('https://YOUR-CANCEL-CALLBACK-URL-HERE') // Optional, if omitted the callback URL is used
->callbackHalt('https://YOUR-HALT-CALLBACK-URL-HERE') // Optional, if omitted the callbackCancel URL is used
->user($pfUser->getIdentifier())
->step('preview') // Optional, if omitted the editor jumps to the last visited step