Skip to content

santwer/Exporter

Repository files navigation

Word Template Exporter

Laravel package for exporting Word templates with placeholders as .docx or .pdf. Based on phpoffice/phpword.

Commit Activity Total Downloads Latest Stable Version License

Installation

composer require santwer/exporter

For PDF export, LibreOffice must be installed. See the full documentation.

Full documentation

Full documentation: santwer.github.io/Exporter/ · Source: github.com/santwer/Exporter. The docs cover installation, configuration, export classes, template syntax, charts, images, tables, and more.

Quick example

use Santwer\Exporter\Facade\WordExport;

WordExport::download(new MyExport(), 'export.docx');

Create an export class that implements FromWordTemplate (and optional concerns like GlobalTokens, TokensFromCollection). See the docs for export classes, template syntax, and configuration.

License

This package is licensed under the MIT License.