Skip to main content
Participant
August 28, 2024
Answered

wrong font in pdf generated output

  • August 28, 2024
  • 2 replies
  • 494 views

Generating a PDF output I get a file where some lines (only a few out of 200 pages) have the wrong font (usually TMS Roman), while the majority has the right font (OpenSans) that I set in css file.

Topics are imported from a Word file and are NOT in a "clean" HTML however the HTML generated output is fine, showing OpenSans font everywhere.

Adobe Support suggested to start from a brand new project, I tried importing only topics and css but the result is the same.

I'm using

RoboHelp version 2020.8.34

OS Windows 10 Enterprise 22H2 OS build 19045.4780

 

    This topic has been closed for replies.
    Correct answer defaultut50h3fm2ckn

    (almost) solved!

    I found that I forgot to set fallback fonts in my .css file.

    I replaced the occurences of

    font-family: 'Open Sans';

    with 

    font-family: 'Open Sans', Arial, Helvetica, sans-serif;

    and I obtained a good-looking pdf.

    Maybe it is NOT the perfect solution but it is enough for my needs

    2 replies

    defaultut50h3fm2cknAuthorCorrect answer
    Participant
    August 30, 2024

    (almost) solved!

    I found that I forgot to set fallback fonts in my .css file.

    I replaced the occurences of

    font-family: 'Open Sans';

    with 

    font-family: 'Open Sans', Arial, Helvetica, sans-serif;

    and I obtained a good-looking pdf.

    Maybe it is NOT the perfect solution but it is enough for my needs

    Jeff_Coatsworth
    Community Expert
    Community Expert
    August 28, 2024

    I would clean up the source topics' HTML in RH - that's probably where the generation of the PDF output is going astray.

    Participant
    August 28, 2024

    I tried generating a pdf with only two topics that I cleaned getting rid of all <div> </div> and <span> </span> that I got during the import from Word but the result is the same: some lines with the wrong font

     

    Participant
    August 28, 2024

    Now I tried using the default "book" master page and ... it works! Font all OpenSans!

    I have to compare with "book" the master page that I'm using (though I'm sure I started from a duplicate of "book")