1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2026-03-14 13:55:44 +01:00

filigrane: conversion d'un svg filigrané en pdf final

Reste à faire le svg 🙃
This commit is contained in:
Gabriel Poma 2024-12-13 18:47:56 +01:00
commit 946ae655b6
2 changed files with 25 additions and 0 deletions

View file

@ -178,6 +178,7 @@ $f3->route('POST /image2svg',
$f3->route('POST /sign',
function($f3) {
$filename = null;
$filigrane = $f3->get('POST.filigrane');
$tmpfile = tempnam($f3->get('UPLOADS'), 'pdfsignature_sign_'.uniqid("", true));
unlink($tmpfile);
$svgFiles = [];
@ -215,6 +216,9 @@ $f3->route('POST /sign',
PDFSignature::createPDFFromSvg($svgFiles, $tmpfile.'.svg.pdf');
PDFSignature::addSvgToPDF($tmpfile.'.pdf', $tmpfile.'.svg.pdf', $tmpfile.'_signe.pdf');
if ($filigrane) {
PDFSignature::convertTextToFiligrane($filigrane, $tmpfile.'_signe.pdf');
}
Web::instance()->send($tmpfile.'_signe.pdf', null, 0, TRUE, $filename);