Easiest way to do this would be to call window.print() when the button is clicked. That will open up the print dialog and the user can save it to PDF themselves.
window.print()