Site logo

Archived topic

Print Desktop View with Chrome or Firefox

5 replies · Started by HansRuedi on October 6, 2022

Viewing posts 1–6 of 6

If I print my GP-based website (3.1.3/2.1.2) with Safari 16.0 on desktop, it looks the way I see it in Safari (desktop view incl mods based on @print in style.css). Homepage fits nicely on A4 …
https://schwarzaufweiss.ch

If I print with Chrome or Firefox (latest versions) it's using mobile styling – btw same with generatepress.com itself. I didn't find a way with CSS params to print desktop view with Chrome or Firefox.

Thanks for a hint.

Hi Hans,

Can you check the scale setting when printing? Can you take a screenshot of the issue from your end as well?

I tried to preview printing your site on my end, and it seems to be previewing desktop view on A4 settings.

Hi Fernando,

Scaling isn't the problem, but I missed to choose «no margins» in both apps. In Firefox it's almost working now (not centered on A4, but at least desktop view), in Chrome it's not…

Screenshot: Print Dialog with Chrome on Mac

This seems to be the default behavior when printing in Chrome though.

Can you try adding this CSS?:

@media print {
  @page {
    size: 330mm 427mm;
    margin: 0mm;
  }
  .grid-container {
    width: 2000px;
  }
}

That's something i already had in my CSS based on hints on the net, did not help. It «breaks» printing in all three browsers.

As a mac user I'm happy that's working at least in Safari, that way I'm able to get hard copies for presentations.

For now I will mark this ticket as resolved.

I see. I tested the code, and it seems to be working from my end though. In any case, feel free to reach out anytime you'll need assistance with anything else. Have a nice day!

This archived topic is closed to new replies.