Code Monkey home page Code Monkey logo

Comments (4)

vivcat avatar vivcat commented on June 9, 2024

👋 @manuelpoelzl

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.

We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

from html-to-image.

Dhan3777 avatar Dhan3777 commented on June 9, 2024

+1

@manuelpoelzl did you find any solution ?

from html-to-image.

manuelpoelzl avatar manuelpoelzl commented on June 9, 2024

@Dhan3777
Not really, at least not directly.
I'm currently tinkering with the jsdom library, which is a great way to get an HTML element.
However, when generating with toJPG, an error is thrown that HTMLCanvas is not defined.

I haven't found a way around the error yet, will update you here as soon as I find out!

from html-to-image.

manuelpoelzl avatar manuelpoelzl commented on June 9, 2024

@Dhan3777

Update:
I ended up modifying the HTML on the server and send the HTML string back to my react app.
There I use the DOMParser to convert the said stringt to an HTMLElement which I then pass to the toPng function of this lib.

There seems to be a problem tho, that the HTML can not be converted, since I get back an empty data url.
In case you're interested, I opened #449

from html-to-image.

Related Issues (20)

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.