ddeboer/document-manipulation-bundle
Bundle structure) may require refactoring for Laravel integration.LiveDocxManipulator, PdfTkManipulator) as Laravel services.config.yml (no Laravel’s .env support).LiveDocxManipulator → app()->make('liveDocx')).config.yml to Laravel’s config/document_manipulation.php.php artisan document:merge) for admin tasks.| Component | Laravel Fit | Notes |
|---|---|---|
| LiveDocx API | Medium (API wrapper) | Requires ZendService\LiveDocx update or custom proxy. |
| Pdftk CLI | High | Works if installed on server. |
| Symfony Bundle | Low | Needs refactoring for Laravel’s DI. |
| Templating | High | Integrates with Laravel’s Blade/Twig. |
Manipulator interfaces) into a Laravel-compatible package.Container with Laravel’s Illuminate\Container.config/ and use Laravel’s config() helper.ZendService\LiveDocx with a custom Guzzle client or SDK.AppServiceProvider:
$this->app->singleton('liveDocx', function ($app) {
return new LiveDocxManipulator($app['config']['document_manipulation.livedocx']);
});
use Facades\Document\LiveDocx;
LiveDocx::mergeTemplate('contract.docx', $data)->saveAs('signed_contract.docx');
php-curl (for LiveDocx), php-gd (for image handling in PDFs).memory_limit adjustments.{{ user.name }}) and validate with bundle..env).public function generateContract(User $user) {
$contract = LiveDocx::merge('templates/contract.docx', $user->toArray());
return response()->download($contract->getPath());
}
DocumentException and return user-friendly errors.pdftk exit codes) via Laravel’s logging.config/ or .env.tinker to test manipulators in isolation.class GenerateDocumentJob implements ShouldQueue {
public function handle() {
$manipulator = app('liveDocx');
$manipulator->merge(...)->save();
}
}
How can I help you explore Laravel packages today?