如何在 Canvas 上加载 Pdf 文件作为 image.src? [英] How to load Pdf file on Canvas as a image.src?
本文介绍了如何在 Canvas 上加载 Pdf 文件作为 image.src?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在画布上加载图像,但现在我想用 pdf 文件替换图像.如何在 Canvas 上加载 Pdf 文件作为 image.src?
I am able to load image on canvas but now I want to replace the Image with pdf file. How to load Pdf file on Canvas as a image.src?
推荐答案
您可以使用 pdf.js https://github.com/mozilla/pdf.js/
You can achieve this with pdf.js https://github.com/mozilla/pdf.js/
看看这篇文章http://www.codediesel.com/javascript/rendering-pdf-in-html5-canvas/
这篇关于如何在 Canvas 上加载 Pdf 文件作为 image.src?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文