0
你好,我有一个问题,Font not not in DOMPDF
我想添加一个条形码字体的标签,我生成的PDF标签。
当我生成PDF中的标签它不工作,但在我看来它工作正常。
我使用DOMPDF为laravel。
我包括我的字体像这样:
<style>
@font-face {
font-family: 'barcode_fontregular';
src: url('{{url('/css/barcode/BarcodeFont.ttf')}}') format('woff2'),
url('{{url('/css/barcode/BarcodeFont.ttf')}}') format('woff');
url('{{url('/css/barcode/BarcodeFont.ttf')}}') format('truetype');
font-weight: normal;
font-style: normal;
}
</style>
我到底做错了什么? 任何帮助表示赞赏。
谢谢!
你把你的“css”文件夹放在哪里? – Ronald
在laravel应用程序的根文件夹@Ronald – Rubberduck1337106092
不在公用文件夹中?如果你把它放在公共文件夹中,我建议使用这个{{URL :: asset('/ css/barcode/BarcodeFont.ttf')}} – Ronald