Letter Head with Custom Font Family

I’m trying to add a font family for use in my letter head. This is what I’ve done.
It works on print preview and in full page view. Only PDF view produces error: PDF generation failed because of broken image links

Has anyone else tried using a custom font family in their letter head with success?

<style>
@font-face {
  font-family: Rockwell;
  src: url("/files/ROCKB.TTF");
  font-weight: bold;
}
.custom-letter-head span {
    display: block;
    margin-top: 1px;
    font-family: "Times New Roman";
    color: #7f7f7f;
}
.custom-letter-head {
    display: flex;
}
.contact-info {
    margin-left: 1em;
}
.company-name {
    font-family: "Rockwell" !important;
    font-weight: bold;
    font-size: x-large;
    margin-bottom: 9px;
}

</style>
<div class="custom-letter-head">
<img src="/files/LOGO.png" style="max-width: 9em; max-height: 5em;">
<div class="contact-info">
    <span class="company-name">COMPANY NAME.</span>
    <span>ADDRESS</span>
    <span>Tel: </span>
    <span>Fax: </span>
    <span>Email: </span>
<div>
</div>
1 Like

Go to files upload font file

use full link https://{sitename}/files/ROCKB.TTF instead of just /files/ROCKB.TTF
because wkhtmltopdf use full link
or use custom app to do it

Worked like a charm! Thank you :slight_smile:

1 Like

Welcome