Download the PHP package voilab/tctable without Composer

On this page you can find all versions of the php package voilab/tctable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package tctable

Voilab TcTable for TCPDF

Install

Via Composer

Create a composer.json file in your project root:

Usage

The goal of this library is not to replace a complex HTML table with row and cell spans. It's mainly useful if you want to display loads of lines (for an invoice, etc.) and be sure page breaks are in the right place. You can adapt the number of widow lines (minimum of lines that must appear on the last page), and use plugins to customize the flow (see below).

Basic usage

Plugins

Have a column that fit the remaining page width

Stripe rows

Widows management

Debug

The TcTable comes with a debug plugin tool that display datas passed in each event.

You can extend the printer object by creating your own:

Advanced plugin: draw a subtotal for a column at end of each page

We can go further by calculating a sum for a column, and display the current sum at the end of the page, and finally report it on the next page.

And the TcTable

Custom events

TcTable triggers some events we can listen to. Plugins use them a lot. But you can simply define events without the need of plugins. It allows us to add some usefull methods.

Add headers on each new page

Renderer and body functions

When parsing data, you can define either a renderer function for each or some columns, or an anonymous function when calling $tctable->addBody(). These functions are called twice, because it is needed in the process for height calculation. You need to take that into account in certain cases.

The same idea applies to column renderers.

Note In cases like the one above (creating a sum), you better should use plugins or events. With the event _TcTable::EV_ROWADDED, you can do exactely the same thing without bothering with height calculation (see below).

Optimizations

You can optimize the workflow if you know exactly the height of each row. You can bypass the height calculation this way:

If you want to change the way cell's height is calculated, you can override the default behaviour this way:

Remember that only multiline cells are checked for their height. The others aren't taken in the process.

Custom drawing function

If you need to insert images or need to do very specific things with cell's drawing, you can bypass the normal drawing function this way:

Testing

No test currently written...

Security

If you discover any security related issues, please use the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of tctable with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
tecnickcom/tcpdf Version 6.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package voilab/tctable contains the following files

Loading the files please wait ....