2017 © Pedro Peláez
 

library livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

image

awakenweb/livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

  • Friday, March 31, 2017
  • by awakenweb
  • Repository
  • 2 Watchers
  • 6 Stars
  • 223 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 7 Open issues
  • 7 Versions
  • 2 % Grown

The README.md

Build Status Packagist, (*1)

SensioLabsInsight, (*2)

This package is not maintained anymore.

The Livedocxs service will shut down on Septembre 30th 2017.

Use https://github.com/TextControl/txtextcontrol-reportingcloud-php instead

Livedocx

Generate PDF and other document types using the Livedocx webservice in PHP., (*3)

You can now check the complete documentation, (*4)

Why this package?

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

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., (*6)

I developped this Livedocx client with two point in mind:, (*7)

  • just the strict necessary dependencies
  • an object oriented API

Hope you will find it useful., (*8)

This package is unit tested with Atoum, (*9)

Prerequisites

This package requires:, (*10)

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

*_(Livedocx is unaffected by Heartbleed security leak)_, (*11)

Installation

To install this package using Composer, simply add this to you composer.json file, (*12)

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

Available framework integration packages: * Laravel 4: awakenweb/Livedocx4Laravel, (*13)

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

This package provides support for the following API:, (*14)

  • 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., (*15)

Use

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

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., (*17)

<?php

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

// for free accounts:
$wsdl = 'https://api.livedocx.com/2.1/mailmerge.asmx?wsdl';
// for premium:
$wsdl = "https://premium01.livedocx.com/REPLACE_THIS_BY_YOUR_USERNAME/mailmerge.asmx?WSDL"
// for fully licensed: only you may know

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

$livedocx->assign(array(
    'somefieldname'  => 'some value',
    'someOtherField' => 'another value'
    )
);

$remoteTemplate = $livedocx->createRemoteTemplate();
$remoteTemplate->setName('myTemplate.docx')
               ->setAsActive();

$document = $livedocx->prepare();
$document->setPassword('$3CR3T');
$document->create();

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

F.A.Q

  • 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.

Misc

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., (*18)

The Versions

31/03 2017

dev-master

9999999-dev http://github.com/awakenweb/livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-soap *
  • ext-openssl *

 

The Development Requires

23/02 2015

dev-DocumentBuilder

dev-DocumentBuilder http://github.com/awakenweb/livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-soap *
  • ext-openssl *

 

The Development Requires

17/10 2014

1.0.2

1.0.2.0 http://github.com/awakenweb/livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-soap *
  • ext-openssl *

 

The Development Requires

16/06 2014

1.0.1

1.0.1.0 http://github.com/awakenweb/livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-soap *
  • ext-openssl *

 

The Development Requires

04/06 2014

1.0

1.0.0.0 http://github.com/awakenweb/livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-soap *
  • ext-openssl *

 

The Development Requires

17/05 2014

0.9.0-beta2

0.9.0.0-beta2 http://github.com/awakenweb/livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-soap *
  • ext-openssl *

 

The Development Requires

15/05 2014

v0.9.0-beta

0.9.0.0-beta http://github.com/awakenweb/livedocx

Livedocx webservice PHP API for PDF generation without using Zend Framework

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-soap *
  • ext-openssl *

 

The Development Requires