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.

Excluding navbar when printing

See original GitHub issue

This might be more of a question than an issue as I’m quite new to CSS (which could be my issue) and I’m just learning it.

I’m playing around with putting my revealjs slide in a vue component. I am trying to print using decktape, but it seems like I can’t find a way to exclude the navbar.

My setup uses vuejs with bootstrap-vue. I’ve made a sample site here: https://deanagan.github.io/gallery/

I am using decktape version 3.1.0

This is how I print my slide:

decktape reveal https://deanagan.github.io/gallery/ -s 1380x860 --chrome-arg=--disable-web-security --chrome-path "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" slides.pdf

The output still has the navbar on top in the pdf. Is there a way to exclude it?

I tried adding "class=“d-print-none” which is bootstrap 4’s way of excluding from print, but it doesn’t work.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
deanagancommented, Dec 18, 2020

Sorry about that. You are right, it is coming from my PDF viewer.

1reaction
deanagancommented, Dec 17, 2020

Thanks! I’ll do a bit of experimenting and see what I possibly could come up with.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I hide the navbar when trying to print the page
I have tried using @media print with #navbar { display: none; and it still shows it. I could be just using it incorrectly....
Read more >
How do I hide an element when printing a web page?
To hide the element, add “display:none” to the element with CSS. <style> @media print { .noprint { visibility: hidden; } } </style>.
Read more >
How to hide an element when printing a web page using CSS?
Example 1: In this example, hide the element h1 at printing time. To hide the element h1 use media query and set visibility:hidden....
Read more >
Creating a printable page without the nav bar along the top?
I'm planning to have a print icon which, when clicked, opens a separate page that is ready for printing. I'd like to have...
Read more >
Quicktip: How to hide an element on your page when printing ...
You can use the “@media print” attribute in CSS to apply a style only on the print layout. The part underneath the element...
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