PHP code example of restlin / grid

1. Go to this page and download the library: Download restlin/grid 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/ */

    

restlin / grid example snippets


public function actionPdf($format = 'A4')
{    
    $html = Yii::$app->request->post('html','no data');
    $pdf = new \mPDF;
    $pdf->setFooter('page.{PAGENO} of {nb}');
    $pdf->AddPageByArray(['newformat' => $format]);
    $css = '<link rel="stylesheet" type="text/css" href="css/print.css"/>'; //example css
    $pdf->writeHtml($css.$html);
    $pdf->Output("output.pdf", "I");
}