San Pyae Lin/React Html to Pdf

Created Thu, 21 Feb 2019 00:00:00 +0000 Modified Mon, 11 Jan 2021 03:58:33 +0000
54 Words

React Html to Pdf

Covert html to pdf & print

Live demo: react-html2pdf

Install package

$ npm i react-html2pdf


import { Preview, print } from 'react-html2pdf';

<Preview id={'jsx-template'} >
<button onClick={()=>print('a', 'jsx-template')}> print</button>


Check full example in the example folder.


MIT License. © 2018 San Pyae Lin

comments powered by Disqus