mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Improve rendering quality of signatures
This commit is contained in:
parent
d9bdb0a3fa
commit
e4ba39bdd0
@ -991,12 +991,16 @@ define([
|
||||
document.getElementById('store').addEventListener('click', function(event) {
|
||||
event.preventDefault();
|
||||
var items = []
|
||||
// temporarey resize of canvas to improve rendering quality
|
||||
resizeCanvas(4);
|
||||
canvasEditions.forEach(function(canvasEdition, index) {
|
||||
items.push({
|
||||
data: canvasEdition.toDataURL(), index: index,
|
||||
name: index + '.png', type: 'image/png'
|
||||
});
|
||||
})
|
||||
// restore previous canvas size
|
||||
resizeCanvas(0.25);
|
||||
prepareDoc(pdfData, items).then(pdfBytes => {
|
||||
var blob = new Blob([pdfBytes.buffer], { type: "application/pdf" })
|
||||
blob.name = pdfTitle.replace(".pdf", "-signed.pdf");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user