PHP code example of digitalprint / printess-api-php

1. Go to this page and download the library: Download digitalprint/printess-api-php 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/ */

    

digitalprint / printess-api-php example snippets


$printess = new \Printess\Api\PrintessApiClient();
$printess->setAccessToken("TheVerySecretAccessToken");

$job = $printess->production->produce([
            'templateName' => 'st:thesavedjobtoken',
            'outputSettings' => ['dpi' => 150],
            'outputFiles' => [
                [ 'documentName' => 'myDocument' ],
            ],
            'origin' => 'printess',
        ]);

$status = $printess->production->getStatus([
        "jobId" => $job->jobId,
    ]);