mirror of
https://github.com/24eme/signaturepdf.git
synced 2023-08-25 09:33:08 +02:00
Visuel de l'image
This commit is contained in:
parent
c563595bd2
commit
cc05e9d838
@ -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();
|
||||
|
@ -28,7 +28,10 @@
|
||||
<hr />
|
||||
<div class="form-check form-switch float-end"><input class="form-check-input" type="radio" name="radio_signature" id="radio_signature_image"></div>
|
||||
<h5><i class="bi bi-image"></i> Image</h5>
|
||||
<form id="form-image-upload" action="/image2svg" method="POST" class="row g-3" enctype="multipart/form-data">
|
||||
<div class="text-center">
|
||||
<img id="img-upload" style="max-height: 80px" src="" />
|
||||
</div>
|
||||
<form id="form-image-upload" action="/image2svg" method="POST" enctype="multipart/form-data">
|
||||
<input id="input-image-upload" class="form-control" name="image" type="file">
|
||||
</form>
|
||||
<hr />
|
||||
|
Loading…
Reference in New Issue
Block a user