我正在使用coldufsion创建一个pdf文件:
<cfdocument marginbottom="3" margintop="0" overwrite="yes" pagetype="A4" format="#dokuArt#" filename="#docuName#" unit="cm">
...
<cfif len(getDataOrder.strPhoneCustomer)>
<span class="fontawesome">&##xf098;</span>Phone: #getData.strPhoneCustomer#<br />
</cfif>
<cfif len(getData.strFaxCustomer)>
<span class="fontawesome">&##xf1ac;</span>Fax: #getData.strFaxCustomer#<br />
</cfif>
...
</cfdocument>
CSS课程:
.fontawesome {
font-family: 'fontawesome';
}
一切正常,但生成的pdf不会显示fontawesome图标。
字体集成在同一个css文件中,就像上面的fontawesome类一样:
@font-face {
font-family: 'fontawesome';
src: url('fontawesome-webfont.eot');
src: url('fontawesome-webfont.eot?#iefix') format('embedded-opentype'),
url('fontawesome-webfont.woff') format('woff'),
url('fontawesome-webfont.woff2') format('woff2'),
url('fontawesome-webfont.ttf') format('truetype'),
url('fontawesome-webfont.svg') format('svg');
}
我需要做什么才能获得pdf中显示的图标?