kartik-v / yii2-mpdf

A Yii2 wrapper component for the mPDF library which generates PDF files from UTF-8 encoded HTML.
http://demos.krajee.com/mpdf
Other
161 stars 150 forks source link

Multiple copies of invoice set dynamic page no from view in footer #80

Closed vb2vish closed 5 years ago

vb2vish commented 6 years ago

I generate PDF with multiple copies of invoice at a time so i want to start page no 1 on second copy. For third copy its again start with 1. It is possible or any way to get pagination on view page?

$pdf = new Pdf([
            // set to use core fonts only
            'mode' => Pdf::MODE_BLANK,
            // A4 paper format
            'format' => Pdf::FORMAT_A4,
            // portrait orientation
            'orientation' => Pdf::ORIENT_PORTRAIT,
            // stream to browser inline
            'destination' => Pdf::DEST_BROWSER,
            // your html content input
            'content' => $content,
            // format content from your own css file if needed or use the
            // enhanced bootstrap css built by Krajee for mPDF formatting 
            'cssFile' => '@vendor/kartik-v/yii2-mpdf/assets/kv-mpdf-bootstrap.min.css',
            // any css to be embedded if required
            'cssInline' => '.kv-heading-1{font-size:18px}table{width: 100%;line-height: inherit;text-align: left;}',
            'marginFooter' => 0,
            // call mPDF methods on the fly
            'methods' => [
                'SetTitle' => ['Invoice'],
//                'SetHeader' => ['Example'],
                'SetFooter' => ['Page | {PAGENO}'],
            ]
        ]);

Reset this {PAGENO} after start differnt copy

vb2vish commented 6 years ago

Resolved

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.