forked from cedrickjames/helpdesk-production
-
Notifications
You must be signed in to change notification settings - Fork 1
/
qrcode.php
86 lines (71 loc) · 1.73 KB
/
qrcode.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<?php
require './dompdf/vendor/autoload.php';
use Dompdf\Dompdf;
$html ='<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
@page { margin: 15px; }
body{
font-family: "Calibri", sans-serif;
}
.header{
display: flex;
justify-content: center;
}
.logo{
height: 100px; width: 100px; background-color: blue
}
.label{
font-weight: bold;
font-size:11px;
}
.child{
font-size:11px;
}
p{
margin: 5px
}
.category{
font-weight: bold;
text-decoration: underline;
font-size:11px;
}
table {
margin-top: 10px;
border: 2px;
font-size:11px;
width: 100%;
}
td {
padding-top: 5px;
}
.first{
width: 25%;
}
.second{
width: 40%;
}
.third{
width: 15%;
}
.fourth{
width: 25%;
}
</style>
<script src="../cdn_tailwindcss.js"></script>
</head>
<body style="margin: 0px; padding: 0px; ">
<img src="https://chart.googleapis.com/chart?chs=300x300&cht=qr&chl=asdjkgfaskdjgfasdkjh&choe=UTF-8">
</body>
</html>';
$dompdf = new Dompdf();
$dompdf->loadHtml($html);
$dompdf->setPaper('A5', 'portrait');
$dompdf->render();
$dompdf->stream('Job Order Report.pdf', ['Attachment' => 0]);
?>