PHP code example of pdf4me / pdf4me_api_client_php

1. Go to this page and download the library: Download pdf4me/pdf4me_api_client_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/ */

    

pdf4me / pdf4me_api_client_php example snippets

 php
// load Composer
Client as pdf4meAPI;

$token = "6fg********jdS"; // replace this with your token
$apiurl = 'https://api**.***.com';
$client = new pdf4meAPI($token,$apiurl); // $token is compulsary and $apiurl are optional


# The pdf4meClient object delivers the necessary authentication when instantiating the different pdf4meClients such as for instance Merge

$pdfMerge = $client->pdf4me()->merge([
          "documents"=> [
              [
		'name' => 'test1.pdf',
    		'docData' => $client->getFileData('/var/www/test1.pdf')
], [
		'name' => 'test.pdf',
    		'docData' => $client->getFileData('/var/www/test.pdf')
]]

    ]);

print_r($pdfMerge);