Why print preview (cmd + p) isn't the same as media print emulation with console on Chrome (37 Mac OS X) ?
Print preview :
Media print emulation :
I'm working with Drupal 7 and my css config theme.info print doesn't override block width on the page however I set :
stylesheets[all][] = css/style.css
stylesheets[print][] = css/print.css
But other parts are well overridden. Someone knows why ?
If your Chromebook can't load the print preview, restart your laptop, printer, and router. Additionally, remove and set up the printer again. If the issue persists, clear your Chrome cache, and disable your extensions. You can also reset your browser to default settings.
To force your page into print preview mode: Open the Rendering tab and under Emulate CSS media type select print. From here, you can view and change your CSS, like any other web page. See Get Started With Viewing And Changing CSS.
The print media query controls how a page looks when printed. To force a page into print preview mode: Press Ctrl + Shift + P (Windows, Linux) or Command + Shift + P (macOS) to open the Command Menu.
The print preview will display your page before CSS transitions are applied, so if there’s a transition when some elements are moved, print preview will show them before that transition. This is especially tricky if you use CSS transitions for columns, responsive design, slide out menus etc.
So to fix it in your print style sheet, you need to add the following style:
@media print {
*{ transition: none !important }
}
if above solution not worked for you then the cause of it may be chrome, Chrome doesn't disable the transition property for print media.
in Chrome DEVTools print
option in emulation css media
is only for applying print css rules to the page, for testing purpose, it does not account for all the other things that go along with print, it display the print preview but sometimes it do not display the print page as actual print preview.
And different browser behaves differently in printing the page.The only optimal way to test print is by actually printing, or printing to pdf.
if you are using bootstrap then if you are using only col-md-*
or col-sm-*
it will not work, but if you use col-xs-*
then it will work because The issue is that the page itself is small in terms of pixels, so bootstrap thinks it needs to apply the xs style.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With