| 1 |
<?php |
| 2 |
|
| 3 |
if (!class_exists('FPDF')) { |
| 4 |
require_once __DIR__ . '/vendor/setasign/fpdf/fpdf.php'; |
| 5 |
} |
| 6 |
|
| 7 |
if (!class_exists(\setasign\Fpdi\Fpdi::class)) { |
| 8 |
require_once __DIR__ . '/vendor/setasign/fpdi/src/autoload.php'; |
| 9 |
} |
| 10 |
|
| 11 |
if (!class_exists(\setasign\FpdiProtection\FpdiProtection::class)) { |
| 12 |
require_once __DIR__ . '/vendor/setasign/fpdi-protection/src/autoload.php'; |
| 13 |
} |
| 14 |
|
| 15 |
// TCPDF gives us Unicode text, embedded fonts and right-to-left support, so the |
| 16 |
// buyer watermark works in Cyrillic, Hebrew, Arabic and CJK — not just Latin. |
| 17 |
// Its FPDI adapter (\setasign\Fpdi\Tcpdf\Fpdi) needs the TCPDF class present. |
| 18 |
if (!class_exists('TCPDF')) { |
| 19 |
// Let TCPDF self-configure (K_PATH_MAIN/K_PATH_FONTS from its own location, |
| 20 |
// cache in the system temp dir). Its fonts ship alongside it. |
| 21 |
$tcpdf = __DIR__ . '/vendor/tecnickcom/tcpdf/tcpdf.php'; |
| 22 |
if (is_readable($tcpdf)) { |
| 23 |
require_once $tcpdf; |
| 24 |
} |
| 25 |
} |
| 26 |
|