Signature pad en png pour eviter les problème de ration de pixel

This commit is contained in:
Vincent LAURENT 2021-10-07 09:15:01 +02:00
parent 5aab5e3b57
commit e8ff2e20fd
1 changed files with 2 additions and 3 deletions

View File

@ -244,9 +244,8 @@ loadingTask.promise.then(function(pdf) {
throttle: 0,
onEnd: function() {
document.getElementById('btn_modal_ajouter').setAttribute('disabled', 'disabled');
const file = new File([dataURLtoBlob(signaturePad.toDataURL("image/svg+xml"))], "draw.svg", {
type: 'image/svg+xml'
const file = new File([dataURLtoBlob(signaturePad.toDataURL())], "draw.png", {
type: 'image/png'
});
var data = new FormData();
data.append('file', file);