• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

wrong font in pdf generated output

Community Beginner ,
Aug 28, 2024 Aug 28, 2024

Copy link to clipboard

Copied

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

 

Views

252

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , Aug 28, 2024 Aug 28, 2024

Have a look at the HTML in the topic that has the lines that are displaying the wrong font - is it referencing another CSS? Does it contain in-line styling?

Votes

Translate

Translate
Community Beginner , Aug 30, 2024 Aug 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

Votes

Translate

Translate
Community Expert ,
Aug 28, 2024 Aug 28, 2024

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 28, 2024 Aug 28, 2024

Copy link to clipboard

Copied

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

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 28, 2024 Aug 28, 2024

Copy link to clipboard

Copied

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")

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2024 Aug 28, 2024

Copy link to clipboard

Copied

Have a look at the HTML in the topic that has the lines that are displaying the wrong font - is it referencing another CSS? Does it contain in-line styling?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 30, 2024 Aug 30, 2024

Copy link to clipboard

Copied

LATEST

Thank you Jeff you addresed me in the right direction (the .css)!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Aug 30, 2024 Aug 30, 2024

Copy link to clipboard

Copied

(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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp