Giter Club home page Giter Club logo

svg.todataurl's People

Contributors

bsick7 avatar graingert avatar matti avatar sampumon avatar sweetleon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svg.todataurl's Issues

PNG that is exported is tiny

The resulting image from this is tiny-- is there any way to control what the png size is? The SVG I'm starting with is fairly large.

Not working in Firefox

This has been working great in Chrome for me, but not in Firefox-- the exported image size is 0,0. Has anyone else had any issues with this?

Ignores imported fonts

SVG.toDataURL does not work for imported fonts. Even though the actual <svg> tag next to the image, displays the font perfectly fine.

<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
@import url(https://fonts.googleapis.com/css?family=Open+Sans);

SVG too large to export?

This works wonderfully with smaller svg images, but I'm using this to export an svg and share on facebook. My SVG file is 614,588 characters long. When I try to export this, I get the error message "Can't export! Maybe your browser doesn't support SVG in img element...."

However, when I try it with a smaller SVG image, it does work. Is there a limit to the svg size for this??

Special character in SVG-text-nodes will cause a XML error 5617

Special character like öäüß in SVG-text-nodes will cause a XML error 5617 when using window.btoa for base64 encoding.
console:
SVG.toDataURL: using native renderer for png export. THIS MIGHT FAIL.
SVG.toDataURL: using standard XMLSerializer.serializeToString
SVG.toDataURL: using window.btoa for base64 encoding
XML5617: Ungültiges XML-Zeichen. Zeile: 9, Spalte 163

Forcing a custom encoding using the base64.js will work in actual FF, Chrome & Opera, but throws a SecurityError in IE in line 95 of svg_todataurl.js.
console:
SVG.toDataURL: using native renderer for png export. THIS MIGHT FAIL.
SVG.toDataURL: using standard XMLSerializer.serializeToString
SVG.toDataURL: using custom base64 encoder
SVG.toDataURL: exported image size: 0,0
SCRIPT5022: SecurityError Datei: svg_todataurl.js, Zeile: 95, Spalte: 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.