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

Generate SVG? #7

Closed
bambax opened this issue Jan 24, 2018 · 18 comments
Closed

Generate SVG? #7

bambax opened this issue Jan 24, 2018 · 18 comments

Comments

@bambax
Copy link

bambax commented Jan 24, 2018

Hello,
What would be necessary to add SVG support, ie the possibility of generating svg files or svg paths, to use offline (in pdf generation for instance)?
Thank you.

@werthdavid
Copy link

I forked this repo and added SVG-rendering. It is published as kjua-svg on NPM. Feel free to try it out

@rugk
Copy link

rugk commented Jul 26, 2019

source seems to be here: https://github.com/werthdavid/kjua

I'll take a look…

Some questions though:

  1. Why not (consider to) contribute it back to upstream here? 😃
  2. Did you keep/support the "crisp mode" in the SVG version, too?

@rugk
Copy link

rugk commented Jul 26, 2019

Ah okay 2. is answered by the "limitations" sections in the Readme.

@werthdavid
Copy link

I didn’t make a PR since the owner of Kjua doesn’t seem to care. He’s not answering to issues or the other open PR and even private mails..

@rugk
Copy link

rugk commented Jul 26, 2019

Anyway, it would be good to propose one. So you show interest at least and no one can blame you that you did not intend to contribute it back.

@werthdavid
Copy link

That’s right I’ll do that..

@rugk rugk mentioned this issue Jul 27, 2019
@werthdavid
Copy link

Crisp-mode was added

@rugk
Copy link

rugk commented Jul 29, 2019

Awesome! I'll need to look into that, because this can solve rugk/offline-qr-code#188 for me… 😄 (don't mind the issue title)

@werthdavid
Copy link

I have not published this on NPM yet, still working on embedding text at least... do you need a release for your extension?

@rugk
Copy link

rugk commented Jul 30, 2019

I can also just manually download/use the JS file, so no. 😄

@rugk
Copy link

rugk commented Jul 30, 2019

Okay, actually a release would be nice. I use the file in dist usually.

@werthdavid
Copy link

Will do

@werthdavid
Copy link

werthdavid commented Jul 30, 2019

kjua-svg@1.6.1
(I am willingly breaking semver since I want it to be close to kjua. so kjua 0.6 will always be a kjua-svg 1.6)

@rugk
Copy link

rugk commented Jul 30, 2019

If this lib is really not maintained, you could just continue maintaining/versioning it as usual.

BTW 1.6.1 release is not on GitHub yet: https://github.com/werthdavid/kjua (maybe just npm?)

@rugk
Copy link

rugk commented Jul 30, 2019

Okay, I am testing how the new lib looks in rugk/qr-code-libs-test#2. What I've noticed so far as that the SVG version is bigger and does not add an automatic border? (still v1.6, so crisp does not work yet)

@werthdavid
Copy link

I’ve added svg.js in 1.6.2 to enable embedding of Label or Image on the SVG element. Couldn’t get it to work with plain JS, svg manipulation is a pain in the a**.

Is this a problem? Any better ideas?

@rugk
Copy link

rugk commented Jul 31, 2019

The new releases are still not tagged on GitHub. Anyway, I've updated my test (comparison) site and it works great!

@lrsjng
Copy link
Owner

lrsjng commented Jul 25, 2020

I added a svg mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants