Support Forum

Please note that this forum is only available to you in read only mode. In order to contribute to this conversation you will need to renew your subscription.

How to Print page WYSIWYG

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

When I print from the browser the layout is missing most of the CSS.
ScreenShot2015-09-16at2.17.20PM.jpg


How do I get it to print exactly like the webpage?

www.commercialdoorcompany.com/
  • ODiN Mayland's Avatar
  • ODiN Mayland
  • LIfetime Developer - Big Bamboo
  • 818 posts
  • 10 Thanks
  • Karma: 8
Last Edit: 8 years 7 months ago by ODiN Mayland.
The administrator has disabled public write access.
Hi

When you say exactly like the webpage I'm assuming you don't mean including the menu, banner image etc

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
The client would prefer it to print exactly what you see as if it was a screenshot. Is this not possible?

The homepage slideshow in particular is not necessary.

Most customers will be printing product article pages like this:
www.commercialdoorcompany.com/roll-up-doors/roll-up-sectional-doors.html
This is a better example of a page that should print everything as if its a screenshot.

ScreenShot2015-09-17at9.37.54AM.jpg
  • ODiN Mayland's Avatar
  • ODiN Mayland
  • LIfetime Developer - Big Bamboo
  • 818 posts
  • 10 Thanks
  • Karma: 8
The administrator has disabled public write access.
Normally the print stylesheet would have no menu, it might have all images removed, sidebar content removed and generally leaving the text content as the vast majority if not all of printable content

Basically all interactive content is hidden
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Looking at base3 as a reference I've added this locally to a custom.css file

First bit is the html5 boilerplate

/* ==========================================================================
Print styles.
Inlined to avoid the additional HTTP request:
www.phpied.com/delay-loading-your-print-css/
========================================================================== */

@media print {
*,
*:before,
*:after {
background: transparent !important;
color: #000 !important; /* Black prints faster:
www.sanbeiji.com/archives/953 */
box-shadow: none !important;
text-shadow: none !important;
}

a,
a:visited {
text-decoration: underline;
}

a[href]:after {
content: " (" attr(href) ")";
}

abbr[title]:after {
content: " (" attr(title) ")";
}

/*
* Don't show links that are fragment identifiers,
* or use the `javascript:` pseudo protocol
*/

a[href^="#"]:after,
a[href^="javascript:"]:after {
content: "";
}

pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}

/*
* Printing Tables:
* css-discuss.incutio.com/wiki/Printing_Tables
*/

thead {
display: table-header-group;
}

tr,
img {
page-break-inside: avoid;
}

img {
max-width: 100% !important;
}

p,
h2,
h3 {
orphans: 3;
widows: 3;
}

h2,
h3 {
page-break-after: avoid;
}

#menu, #search, #banner, .home #grid2wrap, .home #grid3wrap, .home #grid5wrap, #socialicons, #breadcrumb, #paneltrigger, #sidebar-2, #footerwrap, #toTop {display: none !important;}
#logo h2, #logo h2 a {font-size: 2em !important;}
#main, .item-page {width:100% !important; padding:0;}
.container > div {padding:0;}
.article-title, .article-title a {font-size: 1em !important;}
}
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
At the moment there is a rather large snap with the logo which at 3am is defeating me

basically its too large in Chrome and too small in firefox :)

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
I did initially think about adding a link to a print css file but given you like to use compression using the custom.css file is one request less
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.
Wow, thank for all your efforts.

I have adjusted the css and now understand what to do because of your help!


ScreenShot2015-09-18at9.49.18AM.jpg
  • ODiN Mayland's Avatar
  • ODiN Mayland
  • LIfetime Developer - Big Bamboo
  • 818 posts
  • 10 Thanks
  • Karma: 8
The administrator has disabled public write access.
You're welcome

Looks good :)

Cheers
Paul
  • manh's Avatar
  • manh
  • Moderator
  • 45248 posts
  • 2106 Thanks
  • Karma: 603
The administrator has disabled public write access.

zentoolsIf you use Zentools please post a review at the Joomla! Extensions Directory.

Happy Campers