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.

Tables are not printing correctly

See original GitHub issue

Hello, today I’ve added feature to print tables from my website. Then I have noticed that tables with classes below are not printing correctly, although they are displayed correctly on screen.

  • <thead class="thead-dark"> - Header and font are both white so header is not readable

  • <table class="table table-dark"> - Like header, whole table is white, including the font.

  • <table class="table table-striped"> - There are no striped rows when printing. Class has no effect when printing. Print result is the same with and without it.

At first I suspected that something is wrong with my website (that my CSS is overriding Bootstrap CSS because it is linked after it), but then I tried to print tables from official Bootstrap website and got the same issue.

I’m using Bootstrap v4.0

Hope this will be resolved soon. Thanks.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
cireficccommented, Nov 8, 2018

@mdoUnsure how much we should override that, which would screw things up for folks who want that background-color

Well, Bootstrap definitely overrides it and sets the background to white. Shouldn’t it be inherit so that you don’t override any colors that we’ve set in the table cell? Seems like Bootstrap is telling developers how things should print, instead of developers telling Bootstrap how it should print things.

1reaction
onassarcommented, Jul 31, 2018

Did this ever get fixed? I’m using v4.1.3 and rendering PDFs with puppeteer, but the coloring is still off. I’ve tried setting -webkit-print-color-adjust: exact; on the appropriate elements as well.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table not printing correctly. - TechNet - Microsoft
The table appears correct on screen, but does not print correctly when printed as part of the page. If I select and print...
Read more >
Table not printing correctly in Word | Tech Support Forum
I am using a table in Word to make labels to fit a set of drawers. I have set the sizes by right...
Read more >
Table shading showing but not printing correctly
I'm having a problem with table shading. When I shade a row, it looks fine on the screen and in print preview, but...
Read more >
9 Ways to Fix Microsoft Word Documents Not Printing Correctly
1. Print Other Microsoft Word Documents · 2. Print Documents in Other Formats · 3. Check Printer Drivers · 4. Check for Problems...
Read more >
Print not working for MS Word docs with tables of contents ...
SOLUTION Go to: Options > Display > Printing Options Check-in: Update Fields Before Printing · OBSERVATION. The problem started occurring after I ...
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