Yii Framework Forum: How do you implement printing with Yii? - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

How do you implement printing with Yii? Rate Topic: -----

#1 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 14 January 2010 - 06:37 PM

Hi all,

I'd like you to share your experience(with examples) about implementing Print button to print using Yii.


  • Printing all page (if some situation occurs)
    Possible solutions:
    1. Put simple JavaScript in view. Script here

  • Printing user relevant information (e.g. SQL query made table, page without/with headers, menus etc.) (possible with .css):
    Possible solutions:
    1. Extension printout for .datagrid and other .css elements printing (anyone please make an example code printing multiple elements eg. header + + .dataGrid) PS. selection does not work

  • All other examples of real life situations with printing.



Also I have created article which should have all possible experience about printing, generating data, reports, charts etc. with Yii using extensions, your own methods and etc. with concrete examples HERE
0

#2 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 14 January 2010 - 07:04 PM

One of solution - extension [printout] for .datagrid and other .css elements printing.

Provide your usage examples of printing relevant information using [printout] extension.

Cheers
0

#3 User is offline   CoLT 

  • Standard Member
  • PipPip
  • Yii
  • Group: Members
  • Posts: 246
  • Joined: 22-November 09

Posted 22 May 2010 - 12:40 PM

Simple example to new users:

            <?php $this->widget('application.extensions.print.printWidget', array(
            	      'coverElement' => '#wrapper', //main page which should not be seen
             	      'printedElement' => '.column2', //element to be printed
                      'title' => 'Report generated by: '.Yii::app()->user->name.' '.' =====  '.Yii::app()->name.',
                       )); 
        ?>


Greetings,
CoLT
0

#4 User is offline   nafa 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 17-April 11

Posted 12 July 2011 - 02:36 AM

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? :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users