php怎么把html文件转为pdf?比如下面这个这个demo.html文件:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet">
<body>
<div class="container">
<div class="card" data-category="fruit">
<div class="card-body">
<h1>hello world</h1>
</div>
</div>
</div>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.slim.js"></script>
<script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.js"></script>
</body>
</html>
我想把它转为pdf保存,用php应该怎么做呢?看了一下mpdf,https://packagist.org/package...可是在laravel中安装不了,执行安装命令后,显示这样的:
- 3 回答
- 0 关注
- 475 浏览
添加回答
举报
0/150
提交
取消