ddeboer / document-manipulation-bundle
Use this Symfony2 bundle to manipulate Microsoft Word and PDF documents
Installs: 375
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 2
Forks: 3
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.0
- symfony/framework-bundle: >=2.1,<2.3-dev
Requires (Dev)
- symfony/framework-bundle: >=2.1,<2.3-dev
- symfony/symfony: >=2.1,<2.3-dev
- zendframework/zendservice-livedocx: 2.*
Suggests
- zendframework/zendservice-livedocx: If you have a LiveDocx account and want to use mail merging
This package is auto-updated.
Last update: 2020-09-06 00:08:06 UTC
README
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.