nuxt-pdf
nuxt-pdf copied to clipboard
svg support
Describe the feature
I noticed that currently svgs are not shown in the pdf. Im trying export a d3js chart and a table, but the chart doesnt appear. Would be nice if the package could handle svgs as well.
Additional information
No response
Currently you would need to parse the SVG yourself and convert it into a base64 image beforehand. You can find some information on how to do this here: https://stackoverflow.com/questions/27706956/render-svg-to-pdf-using-jspdf/35788928#35788928
Otherwise I think it makes sense to extend jsPDF and offer this inside our module via:
- Native support to parse it in the background
- Offer a composable to encapsulate the code provided above
If this is still relevant for you (as it have been a while, sorry for the delay). I could look into adding this!
Please this is very relevant for my use case. Especially with the fact that I am using svg icons from https://icones.js.org/