2017 © Pedro Peláez
 

library tcpdf_wrapper

TCPDF Table Library

image

phillipsdata/tcpdf_wrapper

TCPDF Table Library

  • Thursday, June 16, 2016
  • by tysonphillips
  • Repository
  • 3 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

A wrapper for the TCPDF class that makes it easier to use it for building PDF tables., (*1)

Requirements

TCPDF must already be loaded or autoloaded., (*2)

Install

composer require phillipsdata/tcpdf_wrapper

Basic Usage

Draw a table

use PhillipsData\TcpdfWrapper\TcpdfWrapper;

// Instantiate an instance of the TcpdfWrapper
$oprientation = 'P';
$unit = 'mm';
$format = 'A4';
$unicade = true;
$encoding = 'UTF-8';
$diskcache = false;

$wrapper = new TcpdfWrapper($orientation, $unit, $format, $unicode, $encoding, $diskcache);

// Create a numerically-indexed array of row and column data
// where the key is the column name and the value is the value to display
$data = array(
    array(
        'name' => 'John Doe',
        'fav_color' => 'Blue'
    ),
    array(
        'name' => 'Jane Doe',
        'fav_color' => 'Red'
    )
);

// Define options for the table and the data columns
$options = array(
    'x_pos' => 44,
    'y_pos' => 246,
    'border' => 'RL',
    'height' => 16,
    'line_style' => array('width' => 0.5, 'cap' => 'butt', 'join' => 'miter'),
    'font_size' => 12,
    'col' => array(
        'name' => array(
            'width' => 200,
            'align' => 'L'
        ),
        'fav_color' => array(
            'width' => 100,
            'align' => 'C'
        )
    )
);

$wrapper->drawTable($data, $options); // Draws the given data into the PDF

The Versions

16/06 2016

dev-master

9999999-dev

TCPDF Table Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Tyson Phillips

16/06 2016

1.1.0

1.1.0.0

TCPDF Table Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Tyson Phillips

16/06 2016

dev-support-html-data

dev-support-html-data

TCPDF Table Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Tyson Phillips

14/06 2016

1.0.1

1.0.1.0

TCPDF Table Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Tyson Phillips

14/06 2016

dev-fix-use-of-tcpdf

dev-fix-use-of-tcpdf

TCPDF Table Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Tyson Phillips

14/06 2016

dev-rename-package

dev-rename-package

TCPDF Table Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Tyson Phillips

13/06 2016

1.0.0

1.0.0.0

TCPDF Table Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Tyson Phillips

13/06 2016

dev-init-wrapper

dev-init-wrapper

TCPDF Table Library

  Sources   Download

MIT

The Requires

  • php >=5.3

 

The Development Requires

by Tyson Phillips