-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
lots of extra blank pages when printing CV #29
Comments
The extra blank pages is a goofy thing Chrome does due to how it's interpreting the height of some elements. It's essentially stretching them causing the blank pages. Will have to dig out the fix as I've addressed the same issue in several of my other themes. As far as the sidebar showing up, just need to add |
Props for the fast answer! Awaiting a fix eagerly (I was banging by head against this for the last hour before finally giving up) |
Tried to mirror the fixes from mmistakes/minimal-mistakes@20821e6 in rosekaron/rosekaron.github.io@c440215 but there's still a lot of blank pages (perhaps a bit naive to think that would work) |
Pushed some tweaks to There's not much I can do about due some Chrome quirks when printing. |
Like I said this one is really hard to debug. What's going on is Chrome determines the height of some elements that are being hidden, and when they're hidden with Which is where the blank pages are coming from as far as I can tell. It's really easy to check because in the print stylesheet you can add something like Only problem is there are no elements on the blank pages. It's this miscalculating of height that I can't work around. I've tried all the tricks I could. |
Yeah, I can see the same.. I'm going to try a crazy thing - trying to render the CV directly using PDF.js and see if the same problem occurs. BTW.. this may be related but trying to print using FF/Edge only shows the first page.. |
Why don't you just use an if-then statement instead of the display none. With the display none, the element is still part of the Dom right? |
@14u2ponder How would an if-then statement help here? CSS is what controls the print stylesheet. There isn't a print "layout" that you can selectively turn off or hide parts of the page. That's where |
I don't think I understood the question when I suggested if-then. I just know from experience that display: none has a lot of unintended side effects. I will say that I tested your stylesheet and it works perfectly in chrome, but firefox needs work. I'm using linux and firefox is only trying to print the first page and nothing else. I haven't really got into the theme as a whole as I just decided today that I am going to use it for my theme. It is really nice. As an example, that hero image pushes everything to the bottom of the page even though you have it display: none. I might check out how bootstrap did this because I think they were able to get it right. |
Okay by process of elimination, I've determined that the css that is causing firefox to show only 1 page is in your base.css file. When you comment out base.css from the import, firefox prints perfectly. |
Found the theme's problem. Change display: flex to display: block. Boom! Firefox prints all pages. |
and here is a stackoverflow thread that is probably relevant. (and here's the link to the firefox bug in question) |
A more long term solution might be to go with css grid instead of flexbox. I see the theme uses suzy grid which is a good solution but the cool kids are using css grid in 2018. Just a suggestion. |
I'm not using flexbox for much so I don't think it's that big of issue. |
@mikaelkaron I just want you to know that on my google chrome there are no extra white pages at http://rose.karon.se/cv. You might need to clear your browser or something cause it works fine for me. |
Does adding |
I haven't tried it. I basically just changed base.css. with the display: flex you have flex behavior, but it does not affect the layout much at all from what I've seen. Just add it and test it. My opinion is that support for printing far outweighs the tricks I can have with a flexbox setup. |
The best thing about this theme and his code is that it is very un-opinionated. He wanted to make a theme that all you have to do is use markdown and it just works. As far as I can tell although I haven't looked over his code completely, he just added the grid system and flexbox more as a feature than a core element. Something that you can use if you want to use it. |
So I tested removing That's not needed anymore so I'm fine removing it. Seems to fix the single page print issue with FF and Edge. ref: f848524 |
Funny thing about chrome there, is it possible this got fixed since I tested this last? I’ll have to go back and test ;) thanks for the heads up on the working CV and thank you for spending time on triaging this (and of course thank you Michael for making the initial theme)
: M
|
@mikaelkaron Don't think it has been fixed in Chrome. I tested a long CV page and it still outputs a few blank pages. It's less than before but still present. |
That's funny because I'm using Chrome and I have no problems. Of course I'm using Chrome on Linux so I don't know if you guys are using Mac or what not. I'm not sure. |
@14u2ponder Think it depends on the CV. The one on the demo site has no blank pages when I test it, this one does. What does it do for you using Chrome on Linux? |
@14u2ponder Scratch that. Seems like it definitely is an operating system/browser thing. On Windows Chrome I get all the blank pages... on macOS Chrome there are none. I'm going to go ahead and close this as it seems pretty clear to me it's the browser's issue and not the theme. |
For some reason I see a bunch of extra blank pages when trying to print the CV view.
To reproduce:
crtl+p
(or whatever your OS has for print preview)As a side note
.sidebar
should probably be hidden to as I can see the background of it in the preview.The text was updated successfully, but these errors were encountered: