-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Excluding navbar when printing #227
Comments
Decktape does not activate the print media type, and rather exports the slides how they render in the Web browser. That probably explains why adding I can't think of a way of hiding the navbar in Decktape currently. You could try adding an option to hide it manually. Possiby #191 could help here. |
Thanks! I'll do a bit of experimenting and see what I possibly could come up with. |
Sounds good. Let me know the result of your experiments and see what can be done on Decktape side. |
So I've tried the following steps:
I noticed that the pdf output still included the navbar, however, the screenshots in my screenshots folder now don't have any navbar in them. Any idea why this is? |
It seems CSS media queries may not always be taken into account for PDF export by Puppeteer. I'd suggest you try |
It seems it's only hidden but still accounted in the layout :( Maybe there is a way to override the height to 0 or rely on another CSS property to have it removed from the layout. |
I've tried it and I don't see the gray area in the PDF: test.pdf The possible reasons I could see are either the Chrome version you use, or the PDF viewer. |
Sorry about that. You are right, it is coming from my PDF viewer. |
Let me close this as I think it’s been resolved. |
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:
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.
The text was updated successfully, but these errors were encountered: