svg2pdf.js icon indicating copy to clipboard operation
svg2pdf.js copied to clipboard

image elements with different width/height attributes than the source image are stretched

Open HackbrettXXX opened this issue 6 years ago • 4 comments

This is probably due to a missing viewBox transformation. However, reading the widths from bitmap images is probably not trivial.

HackbrettXXX avatar Sep 04 '19 13:09 HackbrettXXX

Repro

HackbrettXXX avatar Sep 23 '20 14:09 HackbrettXXX

We're running into this issue as well. A start of a solution to toe svg2pdf code seems to be: image which I took from: https://github.com/parallax/jsPDF/issues/3401

LanderBeeuwsaert avatar Dec 30 '23 11:12 LanderBeeuwsaert

Good idea. I would happily merge a PR.

HackbrettXXX avatar Jan 15 '24 09:01 HackbrettXXX

@HackbrettXXX we intend to put this (and in larger view, html => svg => pdf) up as a student project. But that will only start in september 2024. At that moment we hope for the student to solve this and deliver a PR.

LanderBeeuwsaert avatar Jan 15 '24 09:01 LanderBeeuwsaert