From cc05e9d83807ac1c4f3658b0434e5e75305a2276 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Mon, 20 Sep 2021 23:11:05 +0200 Subject: [PATCH] Visuel de l'image --- js/app.js | 4 +++- pdf.html.php | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/js/app.js b/js/app.js index 76f3487..15b9edd 100644 --- a/js/app.js +++ b/js/app.js @@ -46,6 +46,8 @@ loadingTask.promise.then(function(pdf) { xhr.onreadystatechange = function () { svgImage = "data:image/svg+xml;base64,"+btoa(this.responseText); document.getElementById('radio_signature_image').checked = true; + document.getElementById('img-upload').src = svgImage; + document.getElementById('img-upload').classList.remove("d-none"); }; xhr.send( data ); @@ -114,7 +116,7 @@ loadingTask.promise.then(function(pdf) { } if(document.getElementById('radio_signature_text_classic').checked) { - var textSignature = new fabric.Text(document.getElementById('input-signature-text-classic').value); + var textSignature = new fabric.Text(document.getElementById('input-signature-text-classic').value, { fontSize: 16 }); textSignature.top = y - (textSignature.getScaledHeight() / 2); textSignature.left = x - (textSignature.getScaledWidth() / 2); canvasEdition.add(textSignature).renderAll(); diff --git a/pdf.html.php b/pdf.html.php index 7efb950..91c002f 100644 --- a/pdf.html.php +++ b/pdf.html.php @@ -28,7 +28,10 @@
Image
-
+
+ +
+