Skip to content

Downloaded svg logo breaking the result #286

Closed Answered by codemasher
oskay12 asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, the error occurs when the SVG logo contains an XML header. The above image for example has this header:

<?xml version="1.0" ?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->

When you remove it, the QR Code renders without issue.
However you will not yet see the logo, because the <svg> element has fixed width and height attributes that cause it to be positioned outside of the visible area. When you remove these too, the logo appears as expected.

<svg fill="#000000" width="800px" height="800px" viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1">

You can see a bit of the logo here in the lower right corner:

With the u…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@codemasher
Comment options

Answer selected by oskay12
Comment options

You must be logged in to vote
1 reply
@codemasher
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants