Open BrandaoDesign opened 1 year ago
👋 @BrandaoDesign
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.
How to make this plugin work with capacitor?
I am also experiencing this problem. When running inside an Android Webview via Capacitor, html-to-image fails to render if the DOM tree contains an image.
Unfortunately the error is not helpful - just literally "Error"
Here's the error:
The problem was having
CapacitorHttp: {
enabled: true,
},
in my capacitor.config.json
. I removed this and the images started loading normally.
maybe ionic or angular overwrite class FileReader, then FileReader in html-to-image cannot find some methods and return noting.
So what I did was fix it.
so needs to be corrected when the project starts to load.
it may not be the best solution, but it works!
The plugin works correctly in the ionic v4 browser, but when I build it through Android Studio and run on Xiaomi Redmi N 8, Android 10, API 29, it doesn't show any error in the browser's inspect, but the image is not generated.
Expected behavior Trying to generate an image through html using id
current behavior The image is secured when the application runs through ion in the browser but when building and running the application on the mobile it does not run the application on the mobile it does not run the function
steps to
your environment *html-to-image: 1.10.8