Print Preview

Print Preview

by António Godinho -
Number of replies: 2

I've been looking at the docs trying to figure how to make a Print Preview feature.

1. Is there an option that I can use to alter the header and footer for a page?

2. Is there a way to force the Clean theme on a page?


Is the any other way to do this?


Thanx

Average of ratings: -
In reply to António Godinho

Re: Print Preview

by Amal k -

You can use window.print(); feature

In reply to Amal k

Re: Print Preview

by António Godinho -

Solved the problem by creating this CSS:

header, footer {

    display:none;

}


html, body {

    background-color: white !important;

}

And adding this to the page I wanted to print:

$PAGE->requires->css('/blocks/mrbs/PrintPreview.css');


I endup with a minimal layout, that solved the problem. Hope it helps someone else.


Cheers