Needed solution in Reactjs i want to download any component content as a pdf with all the css effect. need help to complete the downloadAsPdf function
import React from 'react'
function downloadAsPdf(component,filename) {
// todo download the component as pdf with that specified filename
}
function Table() {
return (
<div>
Ant content that i want to download as pdf
</div>
)
}
function App() {
return (
<div>
<button onclick={downloadAsPdf(Table,"id.pdf")}>download table as PDF </button>
<p> some other work...</p>
</div>
)
}
export default App