1
0
mirror of https://github.com/24eme/signaturepdf.git synced 2023-08-25 09:33:08 +02:00

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

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);