react-html2pdf

pdf generate libs for react js

Usage no npm install needed!

<script type="module">
  import reactHtml2pdf from 'https://cdn.skypack.dev/react-html2pdf';
</script>

README

react-html2pdf

covert html to pdf

Install package

$ npm i react-html2pdf

Usage

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

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

Example

Check full example in the example folder.

License

MIT License. © 2018 San Pyae Lin