Files
api/services/nginx/app/modules/html2pdf/helpers/html2pdf_template_i.php
T
Jepp9350 45328a6b72 Add PDF generation module with HTML2PDF integration.
This commit introduces a new PDF generation module leveraging the HTML2PDF library. The module generates PDFs from HTML templates, supports customization through styles and templates, and integrates with Minio for storage and retrieval. A test route is added for generating and serving PDFs dynamically.
2025-03-14 14:56:55 +01:00

26 lines
896 B
PHP

<?php
namespace html2pdf\helpers;
interface html2pdf_template_i
{
/**
* Add an image to the template
* @param string $imagePath
* @param string $altText
* @param int $height
* @param int $width
* @param string $align
*
* @return string HTML string for the image
*/
public function addImage(string $imagePath, string $altText = '', int $height = 100, int $width = 100, string $align = 'center'): string;
/**
* Get a src path for the template
* @notation This method is used to get the path of e.g. images (e.g. truckwash-banner-white-compressed.png)
* @param string $path The path to the file, relative to the modules src directory.
* @return string The full path to the file. (e.g. /var/www/html/modules/html2pdf/src/truckwash-banner-white-compressed.png)
*/
public function pathSrc(string $path): string;
}