1
0
Fork 0
mirror of https://github.com/24eme/signaturepdf synced 2024-06-04 06:52:20 +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);