This extension produces print output for selected html elements on a page with desired css styles, multiple selection is allowed
Documentation ¶
Requirements ¶
Installation ¶
- Copy all the 'print' catalogue under /protected/extensions
Usage ¶
- Add button(s) to your view page (several times, if needed - as many as you wish!):
[php]
<?php $this->widget('application.extensions.print.printWidget', array(
'property1'=>'value1',
'property2'=>'value2'));
?>
[php]
where possible properties with their default values are:
- 'cssFile' => 'print.css' string css file name. It's tuned for 'printedElement' => '.dataGrid' by default. In case you change 'printedElement', you MUST edit this file, and the content of this file is absolutely up to you!
- 'coverElement' => '#page' string css selector (understanding by jQuery $()-function) of the element, which covers all inside the 'body', it's a 'div' with id='page' by default
- 'printedElement' => '.dataGrid' string css selector (understanding by jQuery $()-function) of the element to be printed out, by default it's a 'table' with class='dataGrid' (selection result may be not single!)
- 'title' => '' string the title of the printed page
- 'htmlOptions' => array() array htmlOptions array - standard for Yii
Change Log ¶
July 5, 2009 ¶
Total 5 comments
is it ok if i want to put 2 input in the header? i try to display image (it work) and also want to put some text.. is there any way to do it?
This extension work find with me.. but how can i change the picture of the printer itself (it too small) and modify the layout of the printed page?
you can add some tag html in your view.
don't forget close your tag again :D
I added a tag to add text to the print iamge link.
Please please make an example code printing multiple elements eg. header + .dataGrid.
Selection does not work.
Leave a comment
Please login to leave your comment.