ddeboer/document-manipulation-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Use this Symfony2 bundle to manipulate Microsoft Word and PDF documents

0.2 2013-02-26 10:52 UTC

This package is auto-updated.

Last update: 2020-09-06 00:08:06 UTC


README

Build Status

Ddeboer Document Manipulation Bundle

Introduction

Use this bundle to perform operations on PDF and Microsoft Doc documents. The goal of this bundle to abstract away mail merging, appending, etc. of word processor documents.

Features

(todo)

Installation

This bundle is available on Packagist.

Mail merging using LiveDocx

If you want to use the LiveDocxManipulator for mail merging, get an account at LiveDocx, and install ZendService\LiveDocx by adding the following to your composer.json:

    "repositories": [
        {
            "type": "composer",
            "url": "http://packages.zendframework.com/"
        },
        ...
    ],
    "require": {
        "zendframework/zendservice-livedocx": "@stable",
    }

Then configure LiveDocx in your config.yml:

ddeboer_document_manipulation:
  livedocx:
    username: [your LiveDocx username]
    password: [your LiveDocx password]
    wsdl: [your premium LiveDocx WSDL, if you have a premium account]

PDF manipulation using pdftk

Install pdftk, and then configure it in your config.yml:

ddeboer_document_manipulation:
  pdftk:
    binary: /usr/local/bin/pdftk

Replace /usr/local/bin/pdftk with the path to the pdftk binary on your system.

Customization

Create a custom document manipulator

Create your own document manipulator, and implement the ManipulatorInterface. Add your manipulator as a service, and tag that with ddeboer_document_manipulation.manipulator. For instance the standard LiveDocx manipulator is defined as follows:

<service id="ddeboer_document_manipulation.manipulator.live_docx"
         class="Ddeboer\DocumentManipulationBundle\Manipulator\LiveDocxManipulator">
    <tag name="ddeboer_document_manipulation.manipulator" />
</service>

Run tests

Run unit tests:

$ phpunit

Run functional tests:

$ phpunit -c app --group functional vendor/ddeboer/document-manipulation-bundle/Ddeboer/DocumentManipulationBundle/Tests/

Documentation

More extensive documentation will be included in the Resources/doc directory.