PHP code example of artsoft / yii2-print-this

1. Go to this page and download the library: Download artsoft/yii2-print-this library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

artsoft / yii2-print-this example snippets



echo PrintThis::widget([
	'htmlOptions' => [
            'id' => ['print_info', 'print_body'],
            'btnOptions' => [
                'id' => 'btnId',
                'class' => 'btn btn-default btn-sm',
                'data-toggle' => 'tooltip',
                'data-container' => 'body',
                'data-placement' => 'top',
                'data-original-title' => 'Print',
            ]
            'btnText' => 'Print',
            'btnIcon' => 'fa fa-print'
        ],
	'options' => [
		'debug' => false,
		'importCSS' => true,
		'importStyle' => false,
		'loadCSS' => "path/to/my.css",
		'pageTitle' => "",
		'removeInline' => false,
		'printDelay' => 333,
		'header' => null,
		'formValues' => true,
	]
]);