Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id='printedArea'>
- <h1>Hello world</h1>
- </div>
- <input type='button' onclick='print()' value='print me'></input>
- <script>
- function print() {
- jsreport.download('report.pdf', {
- template: {
- content: document.getElementById('printedArea').innerHTML,
- engine: 'none',
- recipe: 'phantom-pdf'
- }});
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement