Livedocx webservice PHP API for PDF generation without using Zend Framework

1.0.2 2014-10-17 21:50 UTC


Build Status Packagist



Generate PDF and other document types using the Livedocx webservice in PHP.

You can now check the complete documentation

Why this package?

You may know a Livedocx package already exists, so why did I bother reinvent the wheel?

The existing Livedocx package is tightly bound to Zend Framework components and requires a lot of dependencies. Requiring nearly half a framework to only use a single library felt like pure overkill to me.

I developped this Livedocx client with two point in mind:

  • just the strict necessary dependencies
  • an object oriented API

Hope you will find it useful.

This package is unit tested with Atoum


This package requires:

  • PHP 5.4+
  • ext-soap
  • ext-openssl *

*(Livedocx is unaffected by Heartbleed security leak)


To install this package using Composer, simply add this to you composer.json file

 "require" : {
    "awakenweb/livedocx" : "dev-master"

Available framework integration packages:

What parts of the Livedocx API are covered by this package?

This package provides support for the following API:

  • Document merging
  • Repeated blocks merging
  • Images merging
  • Bitmap exports
  • Metafiles
  • Subtemplates

As there is really few documentation about the shared documents feature, I did not add support for now. I may add it when I find some doc about how to use it properly.


First, a Livedocx account is required. It may be any account type: free, premium, or fully licenced.

The full documentation is in progress and should arrive shortly. For now, here is a simple example of usage. For more informations, take a look at the code.


use Awakenweb\Livedocx\Soap\Client;
use Awakenweb\Livedocx\Livedocx;
use Awakenweb\Livedocx\Container;

// for free accounts:
$wsdl = '';
// for premium:
$wsdl = ""
// for fully licensed: only you may know

$soap = new Client(new \SoapClient($wsdl));
$soap->connect(USERNAME, PASSWORD);
$Livedocx = new Livedocx($soap, new Container();

    'somefieldname'  => 'some value',
    'someOtherField' => 'another value'

$remoteTemplate = $livedocx->createRemoteTemplate();

$document = $livedocx->prepare();

file_put_contents('myPdfFile.pdf', $document->retrieve('pdf'));


  • I correctly set the fields but nothing appears in my final document: Be warry that the Livedocx webservice is case sensitive for the field names. Double check your field names in your template and your code to see if their case match.


Disclaimer: This package is only a client for the Livedocx API. I do not provide support for the Livedocx API directly as I am not affiliated, associated, authorized, endorsed by, or in any way officially connected with Text Control GmbH.