您可以使用pdf.js实现此功能,该工具的链接为https://github.com/mozilla/pdf.js/。另外,您可以参考这篇文章http://www.codediesel.com/javascript/rendering-pdf-in-html5-canvas/。