glitchit/ds-yii2-tcpdf

Replacement for drivesoftz/yii2-tcpdf abandoned package - TCPDF is a PHP class for generating PDF documents and barcodes.

1.0.1 2017-10-11 03:38 UTC

This package is not auto-updated.

Last update: 2025-05-25 08:17:09 UTC


README

This repository is only as a workaround for the now (one can only asssume) abandoned yii2-tcpdf package from Drivesoftz. I did write this code, I am not claiming to have written this code, this code is provided as is with no garauntee it will work in your project. I happen to have an existing copy of the code and am unable to continue dev on a current project without this package.

Any questions about code can be addressed to: Eakkabin Jaikeawma (CoachMaxz) - eakkabin_it@outlook.co.th - https://drivesoft.co.th/

Original readme.md below:

TCPDF TH

Version: 1.0.1

Release date: 2016-03-13

Author: Eakkabin Jaikeawma (CoachMaxz)

Install

$ composer require drivesoftz/yii2-tcpdf ~1.0

Example

use TCPDF;

$items = array(
    'header' => array(
        array('#', 'text', 15, 'C', ''),
        array('ID', 'text', 35, 'L', ''),
        array('Name', 'text', 55, 'L', ''),
        array('Price', 'number', 25, 'R', ' Baht.'),
        array('Amount', 'number', 25, 'R', ' items.'),
        array('Total', 'number', 25, 'R', ' Baht.'),
    ),
    'items' => array(
        array('1', 'PRO5900001', 'Yii 2 Framework Book', 250, 3, 750)
    )
);
        
(new TCPDF('P'))->table('product-table.pdf', $items);

yii2-tcpdf