Skip to content

Instantly share code, notes, and snippets.

@elpiel
Created January 5, 2017 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elpiel/26e57639c44c61ffb35f5f0708cc8943 to your computer and use it in GitHub Desktop.
Save elpiel/26e57639c44c61ffb35f5f0708cc8943 to your computer and use it in GitHub Desktop.
Problematic HTML code for dompdf 0.7.0 for PHP 7.1
<!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
body, html {
font-size: 100%;
font-family: Helvetica;
margin: 0px;
padding: 0px;
height: 100%;
}
#header {
position: absolute;
top: 0;
left: 0;
right: 0;
}
.content {
padding: 32px;
}
h1 {
color: #FF6600;
font-size: 22px;
text-align: left;
font-weight: bold;
margin-top: 46px;
}
h1:first-child {
margin-top: 0px;
}
h2 {
color: #15325c;
font-size: 16px;
}
table {
width: 100%;
background: #f9f9f9;
border-collapse: collapse;
}
table th {
color: #15325c;
text-align: left;
padding: 6px;
border: 1px solid #FFF;
font-size: 12px;
}
table td {
padding: 6px;
border: 1px solid #FFF;
font-size: 12px;
}
table tr.sub-row td:first-child {
padding-left: 30px;
}
table tr.sub-row td {
background: #FFF;
}
#pdf-footer {
display: none;
}
.footer {
color: #FFF;
padding-left: 24px;
padding-right: 24px;
font-size: 11px;
line-height: 30px;
background: #1893cc;
height: 30px;
}
.page-number {
position: absolute;
right: 24px;
}
.page-number:after {
content: counter(page);
}
a {
color: #000;
}
/* PDF export fixes, we should have the same implementation for csv etc */
@media pdf {
#pdf-footer {
/* fixed on every page */
position: fixed;
display: block;
bottom: 0;
left: 0;
right: 0;
height: 30px;
}
.footer {
line-height: 23px;
}
.page-number {
display: inline-block;
}
#normal-footer {
display: none;
}
}
</style>
</head>
<body>
<div style="background: #ffffff; height: 80px; text-align: center; padding-top: 24px">
<img src="/img/layout/company.svg" height="50"/>
</div>
<div style="background: #eaf2fa; height: 10px;"></div>
<div id="pdf-footer">
<div class="footer">
&copy; 2017 Company
<span class="page-number">Page </span>
</div>
</div>
<div class="content"><h1>Sent mailings</h1>
<table>
<tr>
<th>Title</th>
<th>Created on</th>
<th>Sent on</th>
<th>Subscribers</th>
<th>Opened</th>
<th>Unique opened</th>
<th>Unique clicks (excl. unsubscribe link)</th>
<th>Bounces</th>
</tr>
<tr><td>Last event info: Sensation Welcome to the Pleasuredome</td><td>29-08-2016 19:39:59</td><td>02-09-2016 21:22:09</td><td>1.511.199</td><td>8.777.106</td><td>1.042.332</td><td>559.974</td><td>6.049</td></tr><tr><td>Bud Light Sensation brings Canada Into The Wild</td><td>12-07-2016 12:04:21</td><td>23-07-2016 14:03:34</td><td>980.827</td><td>1.756.764</td><td>448.849</td><td>151.915</td><td>14.422</td></tr><tr><td>Sensation Dubai outdoor</td><td>28-06-2016 11:47:31</td><td>03-07-2016 12:58:14</td><td>53.763.505</td><td>11.492.311</td><td>5.873.486</td><td>703.690</td><td>78.302</td></tr></table>
</div>
<div id="normal-footer">
<div class="footer">
&copy; 2017 Company
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment