加载中......
输入验证码,即可复制
微信扫码下载好向圈APP, 登陆后即可进入消息页面查看验证码
只需要3秒时间
<!DOCTYPE html><html lang="en"><head> <meta charset="utf-8"> <title>Hello world</title></head><body> <h1>Hello world</h1> <script type="text/javascript" src="jspdf.debug.js"></script> <script type="text/javascript"> // https://www.sitepoint.com/generating-pdfs-from-web-pages-on-the-fly-with-jspdf/ var pdf = new jsPDF(); pdf.text(30, 30, 'Hello world!'); pdf.text(40, 40, 'Another line!'); pdf.save('hello_world.pdf'); </script></body></html>将后缀重命名成.js[jspdf.debug.pdf](https://github.com/i042416/KnowlegeRepository/files/967487/jspdf.debug.pdf)
pdf.js下载:

二十行代码实现JavaScript在本地生成pdf文件-1.jpg
程序员圈
15096 查看 3 0 反对

说说我的看法高级模式

您需要登录后才可以回帖 登录|立即注册

  • i安好便无杂念

    2021-2-24 03:15:32 使用道具

    来自: 中国来自: 中国来自: 中国来自: 中国
    用一个库不叫几行实现吧
  • 孤狼

    2021-2-24 16:41:45 使用道具

    来自: 北京来自: 北京来自: 北京来自: 北京
    转发了
  • 九井沐子mm

    2021-2-25 08:15:58 使用道具

    来自: 中国来自: 中国来自: 中国来自: 中国
    转发了

相关阅读