question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bold text are ignored from html to pdf

See original GitHub issue

Hello, it seens I can’t get the bold text in html files passed to the pdf. I tried different ways to get my text bold but none of the attempts were successful.

My attempts

  1. HTML element <strong></strong>
  2. HTML element <b></b>
  3. CSS property font-weight: bold;

Maybe there is a problem?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:30
  • Comments:34

github_iconTop GitHub Comments

24reactions
paulcayoncommented, Jul 20, 2020

A solution that works for my needs : include in the HTML the google font link :

<link` href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600&display=swap" rel="stylesheet">

html {
  font-size: 12px;
  font-family: 'Open Sans' !important;
  font-weight: 400;
}

p.bold {
   font-weight: 600;
}

not perfect but it does the job for me

11reactions
MarcGodardcommented, Sep 4, 2019

@sulaysumaria No it isn’t, but as I said above, it doesn’t effect production (on linux), only dev on my mac. So I don’t care.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to get Bold text using HTML to PDF converter from ...
I am using HTML to PDF converter from Select.Pdf (C#). http://selectpdf.com/. I have included text style() in html but eventually it is not...
Read more >
HTML to PDF - bold and strong tags not working
I am trying to convert HTML to PDF doc using Aspose.pdf 10.9 version. and tags are not converted to bold text in PDF....
Read more >
Font-weight:bold in textarea not working? - Pdfcrowd
I have a problem with font-weight inside text-area . ... Copy the following code to https://pdfcrowd.com/#convert_by_input and click the [Convert To PDF] ...
Read more >
Convert to PDF always displying bold, ignoring styles and font
It's possible the PDF conversion is using Windows Fonts. Make sure the fonts you are using are available in your PC at OS...
Read more >
Bold font is not shown in pdf output from word
Word will therefore not recognise it as bold when you export it to PDF because it already has a pre-defined weight, with that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found