I can successfully create QR Code PNG images with ZXing but there is no easy way to get the output as SVG or EPS.
How can I create a vector image from the BitMatrix object that is created by the QRCodeWriter?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The easiest way I found was to create a PDF with iText and then convert the resulting PDF to EPS or SVG. Here is the code to create the PDF:
I then use image magic for the conversion. Like so:
the same can NOT be done for svg
this does not work
I tested this code with some long content and it worked with up to 600 characters. This is probably down to the precision of either camera on the phone or screen.
I hope this helps someone