Skip to content

Installation

Composer

Install via Composer:

composer require santwer/exporter

Or add to your composer.json:

{
    "require": {
        "santwer/exporter": "^0.5"
    }
}

Then run composer update.

LibreOffice (for PDF export)

PDF export uses LibreOffice’s soffice command to convert .docx to .pdf. Install LibreOffice if you need PDF output.

Linux

sudo apt-get install libreoffice

Windows

  1. Download and install LibreOffice.
  2. Add the directory containing soffice (or soffice.exe) to your system PATH, or set the SOFFICE_PATH environment variable (see Configuration).

Example (Unix-style, adjust path as needed):

export PATH=$PATH:/path/to/libreoffice/program

Security note

PDF conversion runs the soffice command with file paths from your application. Only use templates from trusted sources and sanitize any user-provided template paths to avoid command injection.