I think your concern is the same with this comment. As of this writing, I can't find a way yet to include the background of the page/element to be printed. Actually, I haven't done enough research about this. Not that I'm not interested in enhancing this, but mainly because my hands are tied with my real life projects.

My apologies for the inconvenience.

Just in case you found a way, kindly let me know and I'll be more than willing to upgrade our extension.

First of all, great extenstion, thanx.
Now some thought on multiple prints in one page, aka reaction to this comment.
if we fix the 284th line like suggested

Quote

Yii::app()->clientScript->registerScript('processPrint'.$this->id, '

we have to specify different id's for each and every call of widget, because it is set to default id='mprint' when you not set one, and you end up with non working scenario.
here is example, how it could work, with two links to parts of page that can be printed

Short Question:
Is it Possible to Start the Plugin over an Link in CMENU? I have all action right in a small widget and want to add the print Action there also. THis didn't work =( :
array('label'=>'Print', 'url'=>'#', 'linkOptions'=>array('onclick'=>'void(0)'))

Short Question:
Is it Possible to Start the Plugin over an Link in CMENU? I have all action right in a small widget and want to add the print Action there also. THis didn't work =( :
array('label'=>'Print', 'url'=>'#', 'linkOptions'=>array('onclick'=>'void(0)'))

Any Ideas? Thanks!

Thanks lugaru

Basically, what you need to do is to trigger the "click" event of your mprint link. I tried doing something like

When I specify the element to be printed ('element'=>'.pview1',), the output ignores the CSS file settings. If I do not specify the element to be printed, the CSS settings are observed but of course, the whole page is printed.

I do not specify cssFile in the parameters so the default is being used (mprint.css) I added my own settings to this file.

I have used this extension successfully to print a table when using FF (Ubuntu 14.04 FF 33.0) but as soon as I test it on Chrome (Version 38.0.2125.111 (64-bit)) it generates blank pages. I have also seen the same problem with the current version of Opera.

I tried with my modified css file and with the default mprint.css with the same results.

I use
$this->widget('ext.mPrint.mPrint', array(
'title' => 'title', //the title of the document. Defaults to the HTML title
'tooltip' => 'Print', //tooltip message of the print icon. Defaults to 'print'
'text' => 'Print Results', //text which will appear beside the print icon. Defaults to NULL
'element' => '#print', //the element to be printed.
'exceptions' => array( //the element/s which will be ignored
'.summary',
'.search-form'
),
//'publishCss' => true, //publish the CSS for the whole page?
'visible' => true, //should this be visible to the current user?
'alt' => 'print', //text which will appear if image can't be loaded
'debug' => false, //enable the debugger to see what you will get
'id' => 'printtoprint' //id of the print link
));

it works for me in Chrome on local machine and doesn't when I try to print from a hosting
any suggestion, please