How to save created image to SVG file ?
See original GitHub issueIs there a way to export a created image drawn using react-native-svg to a SVG file?
My goal is to:
- Use react-native-fs to write the SVG data to a SVG file.
- Reference the SVG image from HTML.
<html><body>
<img src="http://phrogz.net/SVG/heart.svg" width="320" height="240">
</body></html>
- Convert HTML to PDF report using react-native-html-to-pdf.
I ran across a brief reference to a new method toDataURL.
While I think writing to a SVG file would be more versatile for PDF report generation, what format does toDataURL output to? SVG? PNG?
svgRef.toDataURL(base64 => {
console.log(base64);
});
Thank you for a great component!
Issue Analytics
- State:
- Created 7 years ago
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Convert JPG Images to SVG for Free | Adobe Express
1. Select. Choose a JPG image from your photo library that is less than 2GB in size.
Read more >JPG to SVG (Online & Free) - Convertio
How to convert JPG to SVG. Step 1. Upload jpg-file(s). Select files from Computer, Google Drive, Dropbox, URL ...
Read more >PNG to SVG: How to Create SVG Files for Cricut (with Pictures)
1. Open your Chrome browser, go to the Chrome Web Store and enter “File Converter - By Online-Convert.com” in your search bar, then...
Read more >4 Ways to Convert Image to SVG File (Free Open Source Tools)
Open your image in Adobe Photoshop. · Go to File>Export>Export As. image to svg ps 1 · Choose SVG as the output format...
Read more >How to Save Images (PNG, SVG, JPEG) – iphone, iPad ...
A. RIGHT CLICK on the LINK to the SVG image as shown below. In this example, you would right click on the text...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Exposing the
toDataURL
API, without having to place the element in the on-screen component tree, would be fantastic.For capturing a VictoryChart chart react-native-view-shot worked for me:
https://github.com/gre/react-native-view-shot