SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <div id='printedArea'>
  2.     <h1>Hello world</h1>
  3. </div>
  4. <input type='button' onclick='print()' value='print me'></input>
  5. <script>
  6.     function print() {
  7.         jsreport.download('report.pdf', {
  8.           template: {
  9.               content: document.getElementById('printedArea').innerHTML,
  10.               engine: 'none',
  11.               recipe: 'phantom-pdf'
  12.         }});
  13.     }
  14. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top