javascript library to convert web page to pdf
Is there any client-side library that can convert a web page to a PDF document? I have used jspdf but the generated pdf does not retain the formatted html (like tags should be boldface in the PDF).
Very simple if your page is not having any sensitive data
Just Do this:
<a href="http://pdfcrowd.com/url_to_pdf/">Save this page to a PDF</a>
OR
Download this tool.
And you can invoke it on any event like:
<script>
function generatePDF(){}
var conv = new ActiveXObject("pdfServMachine.converter");
conv.convert("http://www.google.com", "c:google.pdf", false);
WScript.Echo("finished conversion");
}
</script>
<body onload="generatePDF()">
</body>
var conv = new ActiveXObject("pdfServMachine.converter");
conv.convert("http://www.google.com", "c:google.pdf", false);
WScript.Echo("finished conversion");
OR
For more information
http://snapshotmedia.co.uk/blog/jspdf
http://itextpdf.com/
http://github.com/MrRio/jsPDF
链接地址: http://www.djcxy.com/p/88546.html
上一篇: 绝对位置,但相对于父母
下一篇: JavaScript库将网页转换为PDF