Hi,
Is there any feature to retrive some content from the Cakephp controller side and to send it to a File which then opens a Print dialog box to send it to a Printer in Cakephp or JQuery..
Thanks in Advance...
Hi,
Is there any feature to retrive some content from the Cakephp controller side and to send it to a File which then opens a Print dialog box to send it to a Printer in Cakephp or JQuery..
Thanks in Advance...
Firstly, you might want to consider using a print stylesheet. This will allow you to hide certain things from your layout when users print your pages such as the navigation, the search box, the footer, etc.
Secondly, you can use jQuery to unobtrusively insert a javascript "Print this page" link which will popup the browser's "Print" dialog on the user's screen when activated.
Since this is a client side thing, there is no real CakePHP solution for the problem. The only thing you can do is disable or change the layout used with the following in your controller:
$this->layout = false;
$this->layout = 'print';