your website is on what script ? maybe you can use any ready plugin

look for something like ready html2pdf api