Performance: fix PDF export for maps with many items

This commit is contained in:
Pieter Vander Vennet 2023-11-14 16:14:27 +01:00
parent 7ae1a6c00f
commit 03d976c567
6 changed files with 131 additions and 57 deletions

View file

@ -974,6 +974,9 @@ class SvgToPdfPage {
}
//*/
svgImage.setAttribute("xlink:href", await SvgToPdfPage.blobToBase64(png))
svgImage.style.width = width + "mm"
svgImage.style.height = height + "mm"
console.log("Adding map element to PDF", svgImage)
smallestRect.parentElement.insertBefore(svgImage, smallestRect)
await this.prepareElement(svgImage, [], false)
const smallestRectCss = SvgToPdfInternals.parseCss(smallestRect.getAttribute("style"))