cantoo-scribe / pdf-lib

Create and modify PDF documents in any JavaScript environment
https://pdf-lib.js.org
MIT License
124 stars 24 forks source link

Fix drawSvg to respect the drawig order of each element #25

Closed MatheusrdSantos closed 1 year ago

MatheusrdSantos commented 1 year ago

The issue was related to drawing SVG that contains images. Since images needs to be embedded before the drawing, its code is asynchronous. The previous code was allowing the next elements to be drawn before the image, so they were overlapped by the image.