-
-
Notifications
You must be signed in to change notification settings - Fork 727
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
SVG output #24
Comments
I agree, this would be a useful feature. Hope anyone is willing to contribute on this. |
I'm guessing this ain't happening? |
Not unless someone is willing to contribute on this feature. |
Looks like the new core library used in 2.x supports this feature. Please try it and let me know if this works for you. Please note that documentation of 2.x is not yet up to date and some features like adding a logo or a label still need to be ported to this new version. |
Doesn't work for me, I'm trying |
The SVG works perfectly. Here is how I used it:
It's important that you pass your original QrCode class instance back to SvgWriter, and in my case this was $qrCode instance above. Of course there will be things like logos that won't work as you can't convert bitmap to vector, but for a quick SVG solution it works perfectly fine! I also do not see any code that allows for the label to be rendered using SVG. The SVG also displays fine when just echo / printing it out, whereas the PNG needed to be base64_encoded as a data URI. |
@Emilio-Staropoli you should use the setWriter() method to set your writer or instantiate the SvgWrtier yourself and use its writeString method. |
1 more thing, set header |
Vector formats are useful for QR Codes. Given the popularity and browser support of SVG, I think many people would like to have SVG output in this project.
The text was updated successfully, but these errors were encountered: