REST API wrapper for
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

REST API wrapper for

REST API wrapper for PDF Generator API.


Require this package with composer using the following command:

composer require actualreports/pdfgeneratorapi-php


$client = new \ActualReports\PDFGeneratorAPI\Client($key, $secret);
$data = [
    "DocNumber" => "12312", 
    "TotalAmt" => 1231.12
$content = $client->output(21650, $data);
header('Content-type: '.$content->meta->{'content-type'});
header('Cache-Control: private, must-revalidate, post-check=0, pre-check=0, max-age=1');
header('Pragma: public');
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Content-Disposition: inline; filename="'.$content->meta->name.'"');