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

toSVGText() fails to output with png logo #12

Closed
aBigSchwein opened this issue Feb 15, 2021 · 2 comments
Closed

toSVGText() fails to output with png logo #12

aBigSchwein opened this issue Feb 15, 2021 · 2 comments

Comments

@aBigSchwein
Copy link

Having an issue with toSVGText() not outputting with the logo:

`import QRCode from 'easyqrcodejs-nodejs';

var options = {
text: 'http://www.example.com/test',
width: 315,
height: 315,
colorDark: '#000000',
colorLight: '#FFFFFF',
dotScale: 1,
PO: '#000000',
PI: '#000000',
AO: '#000000',
AI: '#000000',
logo: 'https://www.example.com/img/logo.png',
logoWidth: 59,
logoHeight: 59
}
var qrcode = new QRCode(options);

//Image Logo visible in result image data
var dataURL = await qrcode.toDataURL();

//Image Logo not visible in result svg object
var dataSVG = await qrcode.toSVGText();`

In this example dataURL is a perfect image with qr code and logo, but dataSVG is a perfect qr code, but the space where the logo image should be it is just blank... any idea why this might be happening?

@ushelp
Copy link
Owner

ushelp commented Feb 25, 2021

Note: SVG format use image tag(ns1:href) to load logo by URL, not write logo data in SVG data.

So please check your SVG QRCode can be accessed Logo URL correctly.

@ushelp
Copy link
Owner

ushelp commented Mar 17, 2021

Closed wihtout comments for a long time.

@ushelp ushelp closed this as completed Mar 17, 2021
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

2 participants