Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with base64 encoded image in svg #71

Closed
joakimlustig opened this issue Feb 24, 2018 · 4 comments
Closed

Issue with base64 encoded image in svg #71

joakimlustig opened this issue Feb 24, 2018 · 4 comments
Labels

Comments

@joakimlustig
Copy link

joakimlustig commented Feb 24, 2018

Thanks for making svg-to-pdfkit! This might sound weird, but this is how I use the library. I export a canvas to svg using the library 'canvas2svg'. Then I export that svg to pdfkit using 'svg-to-pdfkit'. The reason is that I haven't found any other way to get high quality images and text from canvas to pdf.

In my canvas I combine text with imported images, which works great for most cases I have tried. But I have one image that generates quite strange pdf output, altough the svg exported from the canvas looks good. So there is probably some part of this svg that messes things up for svg-to-pdfkit or for pdfkit, but I can't figure out what.

This is the svg I'm importing to svg-to-pdfkit: https://www.dropbox.com/s/vr02r6lif2flw9k/test.svg?dl=0

This is the pdf output I get: https://www.dropbox.com/s/sy5fy82r1e27xca/test.pdf?dl=0

Any idea of why this is happening?

Thank you!

@alafr
Copy link
Owner

alafr commented Feb 24, 2018

I only received the pdf file. Can you attach the svg file?

@joakimlustig
Copy link
Author

Sorry I messed up the links. I edited my post with the right one now.

@alafr
Copy link
Owner

alafr commented Feb 25, 2018

It's a bug in PDFKit: pdfkit/issues/339, pdfkit/issues/766

@joakimlustig
Copy link
Author

Oh I see! Thanks a lot! I posted a way to recreate the issue in pdfkit/issues/766.

@alafr alafr added the bug label May 5, 2018
@alafr alafr closed this as completed May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants