You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The same code ported to nodejs produces entirely different results - the SVG is drawn in a wrong position and drawing rectangle actually results in rectangle being over the SVG path, even though it's drawn earlier like in above example
My report includes a Short, Self Contained, Correct (Compilable) Example.
I have attached all PDFs, images, and other files needed to run my SSCCE.
Additional Notes
This is the exact same issue that's happening in pdfkit library, where I aleady created an issue foliojs/pdfkit#1490
the produced pdf results are exact same - wrong svg placement and wrong draw order.
important: edits
EDIT: I solved the wrong placement issue - turns out that was the fault of invalid path. But ordering issue still prevails
EDIT2: Perhaps the layering issue it not really what it seems. Now to me it looks like instead of my SVG path the function draws and strokes the previous rectangle shape. I tried looking for any reset, path end etc related functions in pdflib api but nothing works
The text was updated successfully, but these errors were encountered:
What were you trying to do?
Generate PDF with svg path
How did you attempt to do it?
Implemented code in JS fiddle, where it works perfectly https://jsfiddle.net/5avk4jwd/
What actually happened?
The same code ported to nodejs produces entirely different results - the SVG is drawn in a wrong position and drawing rectangle actually results in rectangle being over the SVG path, even though it's drawn earlier like in above example
correct result from the browser: https://github.com/foliojs/pdfkit/files/13943064/4282dfc2-f3f1-4399-9ec4-191e59185540.pdf
wrong result from nodejs: https://github.com/foliojs/pdfkit/files/13943074/2SFtR3p2.pdf
correct browser result if bg enabled: https://github.com/foliojs/pdfkit/files/13943189/8b7edae8-0a0c-412d-8fa9-4412d5963b9d.pdf
invalid nodejs result: https://github.com/foliojs/pdfkit/files/13943180/5Hl7kt4n.pdf
What did you expect to happen?
Produce the same output as in the browser
How can we reproduce the issue?
https://jsfiddle.net/5avk4jwd/ - the code is here.
paste the same code in NodeJS environment
Version
1.17.1
What environment are you running pdf-lib in?
Browser, Node
Checklist
Additional Notes
This is the exact same issue that's happening in pdfkit library, where I aleady created an issue foliojs/pdfkit#1490
the produced pdf results are exact same - wrong svg placement and wrong draw order.
important: edits
EDIT: I solved the wrong placement issue - turns out that was the fault of invalid path. But ordering issue still prevails
EDIT2: Perhaps the layering issue it not really what it seems. Now to me it looks like instead of my SVG path the function draws and strokes the previous rectangle shape. I tried looking for any reset, path end etc related functions in pdflib api but nothing works
The text was updated successfully, but these errors were encountered: