以下是我的html看起来包含两个要使用mpdf打印的页面。 我正在尝试设置两个页面的图像,即Front.jpg和Background.jpg。但是mpdf没有加载那些图像。
<head>
<style type="text/css">
@page :first {
background-image: url("/home/mehul/www/portal.hsua.com.au/public_html/templates/wordings/Front.jpg");
background-position: top center;
}
@page {
background-image: url(/home/mehul/www/portal.hsua.com.au/public_html/templates/wordings/Background.jpg) 50% 0 repeat;
}
div.front {
page : first;
page-break-after: always;
}
</style>
</head>
<body>
<div class="front">
<p class="western" style="margin-bottom: 0cm; line-height: 0.9cm"> </p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.9cm"> </p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.9cm"> </p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.9cm"> </p>
<p style="margin-left: 75px; color: red; font-size: xx-large">{{@version}}</p>
</div>
<div>
<h1>
<style type="text/css">@page { size: 21.03cm 29.7cm; margin-right: 2.54cm; margin-top: 2.53cm; margin-bottom: 0.88cm }
p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 120%; orphans: 2; widows: 2 }
p.western { font-family: "Calibri", sans-serif; font-size: 10pt }
p.cjk { font-family: "Calibri", sans-serif; font-size: 10pt }
p.ctl { font-family: "Arial", sans-serif; font-size: 10pt }
a:link { so-language: zxx }
</style>
</h1>
<p align="center">
<style type="text/css">@page { size: 21.03cm 29.7cm; margin-right: 2.54cm; margin-top: 2.52cm; margin-bottom: 2.54cm }
p { margin-bottom: 0.25cm; direction: ltr; color: #000000; line-height: 120%; orphans: 2; widows: 2 }
p.western { font-family: "Calibri", sans-serif; font-size: 10pt }
p.cjk { font-family: "Calibri", sans-serif; font-size: 10pt }
p.ctl { font-family: "Arial", sans-serif; font-size: 10pt }
a:link { so-language: zxx }
</style>
</p>
<p class="western" style="margin-left: 0.42cm; margin-bottom: 0cm"><font face="Arial, sans-serif"><font size="5" style="font-size: 18pt"><i>About </i></font></font><font face="Arial, sans-serif"><font size="5" style="font-size: 18pt"><b>High Street Underwriting Agency</b></font></font></p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.02cm"> </p>
<p class="western" style="margin-left: 0.49cm; margin-right: 0.95cm; margin-bottom: 0cm; line-height: 112%"><font face="Arial, sans-serif"><i>High Street Underwriting Agency Pty Limited (High Street) is a member of the Underwriting Agencies Council (UAC). High Street is an authorised Coverholder of Certain Underwriters at Lloyds and is licenced to wholesale insurance in Australia.</i></font></p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.38cm"> </p>
<p class="western" style="margin-left: 0.49cm; margin-right: 0.35cm; margin-bottom: 0cm; line-height: 112%"><font face="Arial, sans-serif"><i>In effecting this Contract of Insurance, any cover is accepted by High Street acting under an authority given by the subscribing Underwriters and High Street is acting as Agent of the Insurers and not the Agent of you, the Insured.</i></font></p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.35cm"> </p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.35cm"> </p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.38cm"> </p>
<p class="western" style="margin-left: 0.42cm; margin-bottom: 0cm"><font face="Arial, sans-serif"><font size="5" style="font-size: 18pt"><i>About </i></font></font><font face="Arial, sans-serif"><font size="5" style="font-size: 18pt"><b>Certain Underwriters at</b></font></font><font face="Arial, sans-serif"><font size="5" style="font-size: 18pt"><i> </i></font></font><font face="Arial, sans-serif"><font size="5" style="font-size: 18pt"><b>Lloyd’s</b></font></font></p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.02cm"> </p>
<p class="western" style="margin-left: 0.49cm; margin-right: 0.32cm; margin-bottom: 0cm; line-height: 113%"><font face="Arial, sans-serif"><i>Security is provided by Certain Underwriters at Lloyd’s. Lloyd's currently enjoys an A+ rating from Standard & Poor's, AA- from Fitch and A from A.M. Best. These ratings are independent opinions of Lloyd’s financial strength and ability to meet its ongoing insurance policy and contract obligations.</i></font></p>
<p class="western" style="margin-bottom: 0cm; line-height: 0.53cm"><img align="left" border="0" height="43" hspace="12" name="Image3"
<p align="right" class="western" style="margin-right: 0cm; margin-bottom: 0cm"> </p>
</div>