Giter Club home page Giter Club logo

fpdf-easytable's Introduction

FPDF EasyTable

It is a PHP class that provides an easy way to make tables for PDF documents that are generated with the FPDF library.

Making tables for PDF documents with this class is as easy and flexible as making HTML tables. And using CSS-style strings we can customize the look of the tables in the same fashion HTML tables are styling with CSS.

No messy code with confusing arrays of attributes and texts.

No complicated configuration files.

Building and styling a table with easyTable is simple, clean and fast.

 $table=new easyTable($pdf, 3, 'width:100;');
 
 $table->easyCell('Text 1', 'rowspan:2; valign:T'); 
 $table->easyCell('Text 2', 'bgcolor:#b3ccff; rowspan:2');
 $table->easyCell('Text 3');
 $table->printRow();
 
 $table->rowStyle('min-height:20');
 $table->easyCell('Text 4', 'bgcolor:#3377ff; rowspan:2');
 $table->printRow();

 $table->easyCell('Text 5', 'bgcolor:#99bbff;colspan:2');
 $table->printRow();
 
 $table->endTable();

Content

Features

  • Table and columns width can be defined in user units or percentage

  • Every table cell is a fully customizable (font family, font size, font color, background color, position of the text, vertical padding, horizontal padding...)

  • Cells can span to multiple columns and rows

  • Tables split automatically on page-break

  • Set of header row, so the header can be added automatically on every new page

  • Attribute values can be defined globally, at the table level (affect all the cells in the table), at the row level (will affect just the cells in that row), or locally at the cell level

  • Rows can be set to split on page break if it does not fit in the current page or to be printed on the next page

  • Images can be added to table cells

  • Text can be added on top or below an image in a cell

  • UTF8 Support

  • Tag based font style which allows to mix different font families, font styles, font size and font color in the same cell! NEW FEATURE!!

  • Links NEW FEATURE!!

Comparisons

easyTable vs kind-of-HTML-to-PDF

To use HTML code to make tables for PDF documents is a kind of sloppy hack. To begin with to convert HTML code into a kind of FPDF you need a parcer meaning there is a penalty in performace; and second the results are very poor.

HTML code

<table align:"right" style="border-collapse:collapse">
  <tr>
    <td rowspan="2" style="width:30%; background:#ffb3ec;">Text 1</td>
    <td colspan="2" style="background:#FF66AA;">Text 2</td>
  </tr>
  <tr>
    <td style="width:35%; background:#33ffff;">Text 3 </td>
    <td style="width:35%; background:#ffff33;">Text 4 </td>
  </tr>
</table>

easyTable code

$table=new easyTable($pdf, '%{30, 35, 35}', 'align:R; border:1');
  $table->easyCell('Text 1', 'rowspan:2; bgcolor:#ffb3ec');
  $table->easyCell('Text 2', 'colspan:2; bgcolor:#FF66AA');
  $table->printRow();

  $table->easyCell('Text 3', 'bgcolor:#33ffff');
  $table->easyCell('Text 4', 'bgcolor:#ffff33');
  $table->printRow();
$table->endTable(5);

Examples

Requirements

  • PHP 5.6 or higher
  • FPDF 1.81.
  • exfpdf.php (included in this project)

Manual Install

Download the EasyTable class and FPDF class and put the contents in a directory in your project structure. Be sure you are using FPDF 1.81.

Quick Start

  • create a fpdf object with exfpdf class (extension of fpdf class)
  • create a easyTable object
    $table=new easyTable($pdf, 3, 'border:1');
  • add some rows
    $table->easyCell('Text 1', 'valign:T'); 
    $table->easyCell('Text 2', 'bgcolor:#b3ccff;');
    $table->easyCell('Text 3');
    $table->printRow();

    $table->rowStyle('min-height:20; align:{C}');   // let's adjust the height of this row
    $table->easyCell('Text 4', 'colspan:3');
    $table->printRow();
  • when it is done, do not forget to terminate the table
    $table->endTable(4);

Result

Documentation

function __construct( FPDF-object $fpdf_obj, Mix $num_cols[, string $style = '' ])

Description:

Constructs an easyTable object

Parameters:

fpdf_obj

the current FPDF object (constructed with the FPDF library)  
that is being used to write the current PDF document

num_cols

this parameter can be a positive integer (the number of columns)
or a string of the following form

I) a positive integer, the number of columns for the table. The width of every 
column will be equal to the width of the table (given by the width property) divided by 
the number of columns ($num_cols)

II) a string of the form '{c1, c2, c3,... cN}'. In this case every element in the curly 
brackets is a positive numeric value that represent the width of a column. Thus, 
the n-th numeric value is the width of the n-th colum. If the sum of all the width of 
the columns is bigger than the width of the table but less than the width of the document, 
the table will stretch to the sum of the columns width. However, if the sum of the columns 
is bigger than the width of the document, the width of every column will be reduce proportionally 
to make the total sum equal to the width of the document. 

III) a string of the form '%{c1, c2, c3,... cN}'. Similar to the previous case, but this time 
every element represents a percentage of the width of the table. In this case it the sum of 
this percentages is bigger than 100, the execution will be terminated.

style

the global style for the table (see documentation) a semicolon-separated string of attribute 
values that defines the default layout of the table and all the cells and their contents 
(see Documentation section in README.md)

Examples:

    $table= new easyTable($fpdf, 3);
    $table= new easyTable($fpdf, '{35, 45, 55}', 'width:135;');
    $table= new easyTable($fpdf, '%{35, 45, 55}', 'width:190;');

Return value:

An easyTable object

function rowStyle( string $style )

Description:

Set or overwrite the style for all the cells in the current row.

Parameters:

style

a semicolon-separated string of attribute values that defines the layout of all the cells and its content in the current row (see Documentation section in README.md)

Return values

Void

Notes:

This function should be called before the first cell of the current row

function easyCell( string $data [, string $style = '' ])

Description:

Makes a cell in the table

Parameters:

data
the content of the respective cell

style (optional) a semicolon-separated string of attribute values that defines the layout of the cell and its content (see Documentation section in README.md)

Return value

void

function printRow ( [ bool $setAsHeader = false ] )

Description:

This function indicates the end of the current row.

Parameters:

setAsHeader (optional) When it is set as true, it sets the current row as the header for the table; this means that the current row will be printed as the first row of the table (table header) on every page that the table splits on. Remark: 1. In order to work, the table attribute split-row should set as false. 2. Just the first row where this parameter is set as true will be used as header any other will printed as a normal row. 3. For row headers with cells that spans to multiple rows, the last the parameter should be set in the last row of the group. See example 2

Return values

Void

Note:

This function will print the current row as far as the following holds:

      total_rowspan=0

where total_rowspan is set as

      total_rowspan=max(total_rowspan, max(rowspan of cell in the current row))-1;

function endTable( [ int $bottomMargin = 2 ])

Description:

Unset all the data members of the easyTable object

Parameters:

bottomMargin (optional)

Optional. Specify the size in user units of the bottom margin for the table. Default 2 in user units.

If it is negative, the vertical position will be set before the end of the table.

Return values

Void

Style String

In the same fashion as in-line CSS style, Easy Table uses strings of semicolon-separated pairs of properties/values to define the styles to be applied to the different parts of a table. A value set on a property at the table level will be inherited by all the rows (therefore all the cells) in the table. A value set on a property at the row level, will be overwrite the value inherited from the table and, will be passed to all the cells in that row, unless a cell defines its own value for that property.

In what follows, we are going to use the following notation:

C=cell
R=row
T=table

PROPERTY [C/R/T] means that the property PROPERTY can be set on cells, rows, table.

Full list of properties:

width [T]

The width property sets the width of a table. This property can be defined in user units or in percentage of the width of the document.

Syntax:

width:user-units|%;

Examples:

width:145;// 145mm if the user units is mm
width:70%;

Default: the width of the document minus the right and left margin.

border [C/R/T]

The border property indicates if borders must be drawn around the cell or the cells. The value can be either a number:

0: no border
1: frame

or a string containing some or all of the following characters (in any order):

L: left border
T: top border
R: right border
B: bottom border

Default value: 0.

border-color [C/R/T]

The border-color property is used to set the colour of the border to be drawn around the cells. The value can be: Hex color code or RGB color code.

Syntax:

border-color: Hex |RGB;

Example:

border-color:#ABCABC;
border-color:#ABC;
border-color:79,140, 200;

Default value: the current drawn colour set in the document

Note: beware that when set this attribute at the cell level, because the borders of the cells overlap each other, the results might not be as expected on adjacent cell with different border color.

border-width [T]

The border-width property is used to set the width of the lines the border is made of.

Syntax:

border-width:0.5;

Default value: the current drawing line width of the document.

Note: beware that if the border-width is set to thick, the border might overlap the content of the cells. In that case you will have to set appropriate paddingX and paddingY on the cells. (See paddingX and paddingY properties below).

split-row [T]

This property indicate if a row that is at the bottom of the page should be split or not when it reaches the bottom margin, except for rows that contains cell that span to different rows, in this case the row splits. By the fault, any row that does not fit in the page is printed in the next page. Setting the property to false, it will split any row between the pages.

Example:

split-row:false;

l-margin [T]

This property indicate the distance from the left margin from where the table should start.

Syntax:

l-maring:user-units;

Example:

l-maring:45;

Default value: 0.

min-height [R]

The min-height property set the minimum height for all the cells (with rowspan:1) in that specific row.

Syntax:

min-height:user-units;

Example:

min-height:35;

Default value: 0.

align [C/R/T]

This property indicates the horizontal alignment of the element in which it is set. The values can be:

L: to the left
C: at the centre
R: to the right
J: justified (applicable just on cells)

Syntax for tables is:

align:A;
align:A{A-1A-2A-3A-4...};

Explanation: the first character indicates the horizontal alignment of the table (as far as l-margin is not set), while the optional string is a string of the form: {A-1A-2A-3A-4...} (curly brackets included) where A-1, A-2, A-3, A-4, etc. can be L, C, R or J and the A-n letter indicates the horizontal alignment for the content of all the cells in the n-th row. If the number of rows is greater than the length of the optional string, the overflowed rows will have default alignment to the left (L).

Example: (table with 10 rows)

align:R{CCCLLJ};

means that the table is aligned to the right of the document, the content of the cells in the first three rows will be aligned at the centre, the content of the cells in the 4-th and 5-th rows will be aligned to the left and the the content of cells in the 6-th row will be aligned to the right, while the rest of the cell contents in the remaining rows will be aligned to the left.

Syntax for rows is

align:{A-1A-2A-3A-4...};

where A-1, A-2,... etc are as in the table case and with the same functionality: the A-n character indicates the alignment of the cells in the n-th column that are in the respective row.

Example:

align:{LRCCRRLJ}

Syntax for cells is

align:A;

where A can be L, C, R, J.

Default value: L.

valign [C/R/T]

The property valign defines the vertical alignment of the content of the cells. The values can be:

T: top
M: middle
B: bottom

Example:

valign:M; 

Default: T.

Remark: when using valign property on cell with image property set (see below), if the cell does not have text, the behaviour of valign is as expected, this is, the image is positioned accordingly to the value of valign. However, if the cell contains text, the image and the text are valign-ed in the middle of the cell but top (T) or middle (M) valign set the text on top of the image, while valign:B set the text under the image.

bgcolor [C/R/T]

The bgcolor property defines the background colour of the cells The value can be: Hex color code or RGB color code.

Syntax:

bgcolor:Hex | RGB;

Example:

bgcolor:#ABCABC;
bgcolor:#ABC;    
bgcolor:79,140, 200;

Default: the current fill color set in the document

font-family [C/R/T],

It can be either a name defined by the FPDF method AddFont() or one of the standard families (case insensitive):

Courier (fixed-width)
Helvetica or Arial (synonymous; sans serif)
Times (serif)
Symbol (symbolic)
ZapfDingbats (symbolic)

It is also possible to pass an empty string. In that case, the current family is kept.

Example:

font-family:times;

Default: the font-family set in the document.

font-style [C/R/T]

Possible values are (case insensitive):

empty string: regular
B: bold
I: italic
U: underline

or any combination. The default value is regular. Bold and italic styles do not apply to Symbol and ZapfDingbats.

Example:

font-style:IBU

Default: empty;

font-size [C/R/T]

Font size in points.

Example:

font-size:16;

Default: the current font size of the document.

font-color [C/R/T]

This property defines the color of the font for the cells The value can be: Hex color code or RGB color code.

Syntax:

font-color:Hex |RGB;

Example:

font-color:#ABCABC;
font-color:#ABC;    
font-color:79,140, 200;

Default value: the current font color set in the document

line-height [C/R/T]

The line-height property specifies the line height.

Syntax:

line-height:number;

Example:

line-height:1.2;

Default value: 1.

paddingX [C/R/T]

The paddingX property sets the left and right padding (space) of the cells.

Syntax:

paddingX:user-units;

Example:

paddingX:4;

Default: 0.5.

paddingY [C/R/T]

The paddingY property sets the top and bottom padding (space) of the cells.

Syntax

paddingY:user-units;

Example:

paddingY:3;

Default: 1.

colspan [C]

The colspan attribute defines the number of columns a cell should span.

Syntax:

colspan:4;

Default 1

rowspan [C] The rowspan attribute defines the number of rows a cell should span.

Syntax:

rowspan:2;

Default 1

img [C] The img attribute defines the image and its dimensions to be set in the cell.

Syntax:

img:image.png,w80,h50;
img:image.png,h50;
img:image.png;

If no dimensions are specified, the image dimensions are calculate proportionally to fit the width of the cell. If one out of the two dimensions (width or height) is specified but not the other the one that is not specified is calculated proportionally. Default value: empty.

Fonts And UTF8 Support

  1. Get the ttf files for the font you want to use and save them in a directory Fonts.

    NOTE: If you want to use bold, italic or bold-italic font styles you need the respective font files too.

    NOTE: the font must contain the characters you want to use

  2. Using the script makefont.php part of FPDF library (in the makefont directory)

    me@laptop:/path/to/FPDF/makefont$ php makefont.php /path/to/Fonts/My_font.ttf ENCODE
    

    Note: use the right encode in order to use utf-8 symbols FPDF: Tutorial 7.

    NOTE: the font must contain the characters corresponding to the selected encoding.

  3. The last command will create the files My_font.php and My_font.z in the directory /path/to/FPDF/makefont move those file to the directory /path/to/FPDF/font

  4. You are ready to use your fonts in your script:

    $pdf = new PDF();
    $pdf->AddFont('Cool-font','','My_font.php');  // Define the new font to use in the PDF object
    
    // more code
    
    $table=new easyTable($pdf, ...);
    $table->easyCell(iconv("UTF-8", "ENCODE",'Hello World'), 'font-color:#66686b;font-family:Cool-font');
    //etc...
    
  5. Example: we get a ttf font file (my_font.ttf) that support the language and symbols we want to use. For this example we are using Russian. The encode that we are using for Russian is KOI8-R

    php makefont.php /path/to/font_ttf/my_font.ttf KOI8-R
    

    then we copy the resulting files to the font directory of FPDF library.

    Then, in our script:

    $pdf = new PDF();
    
    $pdf->AddFont('FontUTF8','','my_font.php'); 
    
    $pdf->SetFont('FontUTF8','',8); // set default font for the document 
    
    $table=new easyTable($pdf, ...);
    
    $Table->easyCell(iconv("UTF-8", "KOI8-R", "дебет дефинитионес цу")); // Notice the encode KOI8-R
    

    or

    $pdf = new PDF();
    $pdf->AddPage();
    $pdf->SetFont('Arial','B',16);
    
    $pdf->AddFont('FontUTF8','','my_font.php'); 
    
    $table=new easyTable($pdf, 5, '...');	
    $Table->easyCell(iconv("UTF-8", "KOI8-R", "дебет дефинитионес цу"), 'font-family:FontUTF8;'); 
    

    NOTE: For more about the right encode visit FPDF: Tutorial 7 and php inconv

Using with FPDI

If your project requieres easyTable and FPDI, this is how you should do it. Assuming that fpdf.php, easyTable.php, exfpdf.php, fpdi.php and any other files from this libraries are in the same directory.

The class exfpdf should extends the class fpdi instead of the class fpdf. So in exfpdf.php:

<?php

class exFPDF extends FPDI
{
etc
etc

And in your project:

<?php
include 'fpdf.php';
include 'fpdi.php';
include 'exfpdf.php';
include 'easyTable.php';

//$pdf = new FPDI(); remember exfpdf is extending the fpdi class
$pdf=new exFPDF(); // so we initiate exFPDF instead of FPDI

// add a page
$pdf->AddPage();
// set the source file
$pdf->setSourceFile("example-2.pdf");
// import page 1
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 10, 10, 100);

//add another page
$pdf->AddPage();
$pdf->SetFont('helvetica','',10);

$table1=new easyTable($pdf, 2);
$table1->easyCell('Sales Invoice', 'font-size:30; font-style:B; font-color:#00bfff;');
$table1->easyCell('', 'img:fpdf.png, w80; align:R;');
$table1->printRow();
//etc
//etc

Tag Based Font Style

The new version of FPDF EasyTable can handle tag-based font styles at string level.

$table->easyCell('Project: EasyTable', 'font-family:lato; font-size:30; font-color:#00bfff;');

now we can do:

$table->easyCell('<b>Project:</b> <s "font-size:20; font-family:times">EasyTable</s>', 'font-family:lato; font-size:30; font-color:#00bfff;');

The font style set at the string level will over write any other font style set at the cell, row or table level.

Please see the example

Tags

<s "fontstyle">

font-style is a semicolon separated string which can include: font-size, font-family, font-style, font-color, href;

Note: Remember to define every font your project needs.

$pdf->AddFont('MyFabFont','','my_font.php');   
$pdf->AddFont('MyFabFont','B','my_font_bold.php');   
$pdf->AddFont('MyFabFont','I','my_font_italic.php');   
$pdf->AddFont('MyFabFont','BI','my_font_bolditalic.php');   

font-color can be Hex color code or RGB color code.

Shortcuts

<b></b> is equalt to: <s "font-style:B"></s>
<i></i> is equalt to: <s "font-style:I"></s>

Tags can be nested

When nested tags are used, the result is similar to the case in HTML documents.

<b>Helo <i>world</i></b>

 <s "font-style:I; font-color#abc123; font-family:times">Hello  <s "font-style:B; font-family:lato; font-size:20">world</s></s>
  • Different font style can be applied to the letters of a word.
	<b>H<i>e</i><s "font-family:myfont">ll<s "font-size">o</s></s></b> 

Links

Use the property 'href' to set links

<b>Helo <s "font-family:my_fab_font; font-color:#AABBCC; href:http://www.example.com">world</s></b>

Escape sequence

The sequence '\<s' is parced as '<s'

<b>Helo <s "font-family:my_fab_font;">\<[email protected]></s></b>

User units

EasyTable supports the same user units (pt/mm/cm/in) supported by FPDF: construct. Bare in mind that any unit related setting (width, border, etc.) needs to be in the respective unit set at the top document. For example if the units for the document is set as inch, then, all the settings unit related will be considered in the same user units, for instance min-height:1.2; will mean 1.2in.

Common Error

A very typical situation is: "EasyTable works in my localhost but it does not work in remote server"... Seriously, what on earth it has to do with EasyTable?... And the error reported is Fatal error: Uncaught exception 'Exception' with message 'FPDF error: Some data has already been output, can't send PDF file... etc etc...

This happens because when the server runs the script to output a PDF document, it sets the headers as PDF document, however something is trying to output text or html code (for instance an exception or an echo statment) so the server can not change the header for the respective output. is outputting html/txt data.

Another very common error is to forget to add the fonts and its appropiated style (I, B, IB) used in the document. Let's suppose that in your document you use "my_favourite_font". Then you need to add

$pdf->AddFont('MyFabFont','','my_favourite_font.php'); 

if you are using the bold version of it, then you must add:

$pdf->AddFont('MyFabFont','B','my_favourite_font_bold.php');   

if you are using the italic version, then you need to add:

$pdf->AddFont('MyFabFont','I','my_favourite_font_italic.php');   

if you are using the bold-italic, then

$pdf->AddFont('MyFabFont','BI','my_favourite_font_bolditalic.php');

You need to generate each of the font files that needs to be added in your project ('my_favourite_font_bold.php', 'my_favourite_font_italic.php', 'my_favourite_font_bolditalic.php'), refer to your font documentation and see Fonts And UTF8 Support.

Get In Touch

Your comments and questions are welcome: [email protected] (with the subject: EasyTable)

Other projects

Donations

Any monetary contribution would be appreciated :-)

If you are using this for the company you work for, they are getting the money, you are getting the medals and I am getting nothing! Is that fair?

It does cost NOTHING to push the freaky star button!!

Donate

License

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to http://unlicense.org/

fpdf-easytable's People

Contributors

fpdf-easytable avatar volatilflerovium avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

fpdf-easytable's Issues

Word-wrapping extend width of table

image

The problem is shown in the image above, no matter what i have tried i cant succeed to make the word-wrapping fit inside the cell.
The information is collected from a db and is stripped of all html-code before implemented in script, except for some line-breaks which are translated from html-code (i.e. <p> -> \r\n).
I have only seen this occur in the last column.

The blurred information could be a hyperlink or a number referens i.e. 123-456

The margins of the document is set to
$pdf->SetMargins(25,20,25);

image
Before the table in the document there are some fpdf-cells and each is ended to next cell begin on below

$table=new easyTable($pdf,'{11,28,75,50}', 'border:1;');
$table->easyCell('%TEXT%','valign:T;');
$table->easyCell('%TEXT%','valign:T;');
$table->easyCell('%TEXT%','valign:T;');
$table->easyCell('%TEXT%''valign:T;');
$table->printRow();

Each table row is created by a for-loop with the same config

$table->easyCell(" %TEXT%",'paddingY: 2;');	 
$table->easyCell("%TEXT% ",'paddingY: 2;');	 
$table->easyCell(" %TEXT%",'paddingY: 2;');	 
$table->easyCell(" %TEXT%",'paddingY: 2;');	
$table->printRow();

I have tried to set paddingX, but it will still extend the cell.

Is there something i have missed some where i can edit this my self to ensure wordwrapping is done inside the cell?

Is there a way to set page size?

Like in FPDF, there is a way to set page size like this:
$pdf = new FPDF('P','mm','array('90','120');

Is there a way to set the same in exFPDF?

Bottom border doesn't appear on split-row

Hello, first of all thanks for this library, it's helped me a lot building PDF files with PHP and customize them easily.

At this moment I'm trying to create a table setting the property split-row to true because the text contained in some cells may be large and I don't want to leave a big blank space on the pages, but when I generate the file, cell bottom border is not showing, but top border does on the new page as I show at the next image.

imagen

I don't know if this is a bug or something I'm missing in the code. I've checked the documentation, but I didn't find anything that helps me solve this.

PageBreak not trigger

I'm trying to create an invoice using fpdf-easytable.
The problem is when the table height is greater than the page height, it doesn't add a new page.
I only get an empty pdf file and the error Please use the end_table method to terminate the last table whereas the endTable(0) is actually called.

protected function _generateContent()
{
  try {
    $table = new EasyTable($this, '%{100}', 'split-row:1; align:L; border:1; border-color:#FFF; border-width:2');
    for ($i = 0; $i < 100; $i++) {
      $table->easyCell("{$i}");
      $table->printRow();
    }
    $table->endTable(0);
  } catch (\Exception $e) {
    error_log(print_r($e, true));
  }
}

$this is the actual class that extends exFPDF

abstract class Document extends ExFPDF
{
  protected $_pdfData = null;

  public function __construct($data)
  {
    parent::__construct("p", "mm", "A4");

    $this->_pdfData = $data;
    $this->SetAutoPageBreak(true, 10);
    $this->SetMargins(10, 10, 10);
  }
}

Cell Color

Hi ,

is there a way to change a cells color (or font color ) when a value is lower or greater than a constant value ?

George

Fatal error: Using $this when not in object context

Hello,
I am unable to run any of the examples,
while running the basic example this is the error i got
Fatal error: Using $this when not in object context in C:\xampp\htdocs\fpdf-easytable-master\easyTable.php on line 929

How to clear this error

easyCell and AddFont

Hello !
I have a problem with the easycell command which refuses to display anything with my character set whereas with the classic fpdf command Cell works.
apache response error 500...
do you have any idea why?

this is my script :

<?php
include 'fpdf/fpdf.php';
include 'exfpdf.php';
include 'easyTable.php';
define('FPDF_FONTPATH','fpdf/font');

$pdf = new exFPDF();
$pdf->AddFont('Lato-Light','R','Lato-Light.php');
$pdf->AddPage();
$pdf->SetFont('Lato-Light','R',35);

$pdf->Cell(0,10,'Changez de police avec FPDF 3!');

$write=new easyTable($pdf, 1, 'align:C; font-size:15; width:100%');
$write->easyCell('CONTRAT INDIVIDUEL DE FORMATION PROFESSIONNELLE CONTINUE (Article L6353-3 du code du travail)');
$write->printRow();
$write->endTable(1);

$pdf->Output();
?>

thanks a lot!

best regards

valign dont work

Vertical alignment (top) does not work when an image and text are in the same cell.
See example2.php line 67
$table->easyCell($cells[1], 'img:Pics/fpdflogo.png, w30; align:C; valign:T;font-size:6; font-style:I;');
Image and text are displayed in the middle

printRow(true) and AddPage()

Hi,

When defining a table header thru printRow(true), AddPage() does not output the header.
Note that it is working when a new page is output because the table reaches the page end.

I will appreciate you solving this issue (as you did it very quickly with the last issue I wrote!).

Thanks in advance,
Michel.

Escaping <

Hi,

How to escape < in table->easyCell(text)?

I generate a list of emails (like "Jim" <[email protected]>) from a database. Everything from <s is not output.

I inserted a space after the < as a turnaround, but this is not satisfactory.
Something like \< or &lt; could be solutions, specially the 2d one to have the possibility to insert &nbsp;

Thanks,
Michel.

Unable to install with composer...

I used following command to install "composer install fpdf-easytable/fpdf-easytable -vvv" on terminal mode.
I think we need to enable some enhancements...

Wrong page size and orientation at page break

Problem

When some parameters in the AddPage() method are set...

/***** (e.g.) *****/

$pdf->AddPage("P", "Letter", 90);

and the table exceeds the page height, it will create a new page but it will ignore the page size and rotation.

Fix

I fixed this by creating two public methods in the exFPDF class:

public function get_CurPageSize() {
  return $this->CurPageSize;
}

public function get_CurRotation() {
  return $this->CurRotation;
}

and modifying the printRow() method in the easyTable class:

/***** These are the last two if statements in the printRow() method *****/

if($this->table_style['split-row']==false && $this->pdf_obj->PageBreak()<$this->pdf_obj->GetY()+max($block_height,$this->row_heights[0])){
  $this->pdf_obj->addPage($this->document_style['orientation'], $this->pdf_obj->get_CurPageSize(), $this->pdf_obj->get_CurRotation());
  if(count($this->header_row)>0){
    $this->printing_loop(true);
  }
}

if($this->new_table){
  if(count($this->header_row)>0){
    $r=$this->pdf_obj->PageBreak()-($this->pdf_obj->GetY()+$block_height);
    if($r<0 || $r<self::PBThreshold){
      $this->pdf_obj->addPage($this->document_style['orientation'], $this->pdf_obj->get_CurPageSize(), $this->pdf_obj->get_CurRotation());
    }
  }
  $this->new_table=false;
}

I'm sorry if this is not a pull request or if it even should be... I'm quite new to GIT and Github

Weird bug with $pdf->output();

When i run this code it doesn't output anything besides console logs but when i echoed all commands connected with createing pdf and pasted it to new site it works. Do you have idea what's going on?
Snippets of code after $pdf->output(); doesn't execute
`<?php
require('config.php');
require('fpdf.php');
include 'exfpdf.php';
include 'easyTable.php';
include 'qrlib.php';
$compName = 'DLS2018I';
$results=$conn->query("select name,id from competitors where id in (select distinct cu from c where co=(select id from comps where name='$compName'))");
ob_end_clean();
$pdf=new exFPDF();
$pdf->AddFont("arialpl","","arialpl.php");
$pdf->AddFont("arialpl","B","arialbdpl.php");
$pdf->SetFont("arialpl","",25);
$i=0;
while($competitor=$results->fetch_row())
{
QRcode::png("$competitor[0],$competitor[1]", "qr/$competitor[1].png", QR_ECLEVEL_H,2);

echo '<script>console.log('.$i.');</script>';
if($i%6==0)
{
	$pdf->AddPage("P");
	$table=new easyTable($pdf, 2, "font-style:B;");
}
$table->easyCell(iconv("UTF-8","ISO-8859-2//TRANSLIT","$competitor[0]"),"img:qr/$competitor[1].png;align:C;");
 if($i%2==1)
	$table->printRow();
if($i%6==5)
	$table->endTable(4);
$i++;

}
if($i%2==1)
{
$table->printRow();
}
echo '<script>console.log('.$i.');</script>';
$pdf->Output();
echo '<script>console.log("burak");</script>';
?>`

support of html tags

Hello, I would like to ask whether is possible to add some basic html tags in the cells. To be more precise I need somehow a line break inside the cell. Can it be done?

Thanks in advance

Text Center in Cell

I didn't want to continue on other request about cell color so here it is :
We have the option to align text L C R in cells (or headers) but , what if I want the text to be centered both horizontal and vertical inside a cell ? Is that possible ?

Thanks

Laravel usage

I want to use this library in laravel , there is a package
codedge/laravel-fpdf but how can I add this additional
library which is on top of fpdf ? Any clues ?

Feature Request: Hyperlinks

Would be great to be able to use markup to create hyperlinks within a cell, similar to the font tagging feature. e.g. by using HTML syntax: <a href="www.example.com">Link</a>

table header do not repeat

Hello,
I don't understand why my code doesn't repeat the "type" header in colspan 6, it scores well on the first page but not the following ones, but your example number 2 works fine even when I add an extend class exFPDF with the header () and footer () methods.
I don't understand where my mistake is coming from.

<?php
// class extends exFPDF with header() and footer() methods, array generate with mysql request
// result it's simple array
$pdf=new pdfConstructeur(); 
$pdf->AddPage();

// construction des tableaux
$write=new easyTable($pdf, '%{10, 10, 15, 10, 15, 40}', 'width:100%;align:C; font-size:6;font-family:helvetica;border:1;');
$write->easyCell('Type', 'align:C; bgcolor:#d0d0d0;font-style:B; colspan:6;');
$write->printRow();

$write->easyCell(utf8_decode('Rèf doc') , 'align:C; bgcolor:#d0d0d0; font-style:B;');
$write->easyCell('Type', 'align:C; bgcolor:#d0d0d0;font-style:B;');
$write->easyCell('Sous-ensemble', 'align:C; bgcolor:#d0d0d0;font-style:B;');
$write->easyCell('Date', 'align:C; bgcolor:#d0d0d0;font-style:B;');
$write->easyCell(utf8_decode('Matériel'), 'align:C; bgcolor:#d0d0d0;font-style:B;');
$write->easyCell('Objet', 'align:C; bgcolor:#d0d0d0;font-style:B;');
$write->printRow(true);

foreach ($result_const as $key => $value) {
   $write->easyCell(utf8_decode($value['referencement']), 'align:C;');
   $write->easyCell(utf8_decode($value['type']), 'align:C;');
   $write->easyCell(utf8_decode($value['s_ensemble']), 'align:C;');
   $write->easyCell(utf8_decode($value['date']), 'align:C;');
   $write->easyCell(utf8_decode($value['materiels']), 'align:C;');
   $write->easyCell($value['objet'], 'align:C;');
   $write->printRow();
}


$write->endTable(5);

//###############################################

 $pdf->Output();

?>

Thank you for your feedback.

EDIT: I'm sorry, I realized that my example is difficult to follow and not self contained. I'll try to write a better example tomorrow

Remove html entities AND tags

I don't know if this is related but I have a situation where I print data from mysql query that contains both document markup (

) and html entities (   or apostrophe which prints as ').
I tried to use both :
$table->easyCell(htmlspecialchars_decode(strip_tags($row->guard)),'valign:M');
but it doesn't work as expected at least.
Anyone with similar problem ?

split-row: true duplicated image

Hello, i will get to the point.

If split-row is set to true and an image is inside an easyCell, is shown correctly on the first page, but it also appears on the second page. Can we hide the second one?

Here's a screen capture of the problem
p1

Here's my code:

require('fpdf.php');
require('exfpdf.php');
require('easyTable.php');

class PDF extends exFPDF {

function Header()
{   
    
    $this->Image('img/header_bg.png', 0, 0, 209.97, 58.42);
    $this->Image('img/logo0.png', 166.02, 4.13, 36.9, 36.51);
   
    $this->AddFont('Montserrat-ExtraBold', '', 'Montserrat-ExtraBold.php');
    $this->AddFont('Montserrat-Medium', '', 'Montserrat-Medium.php');
    $this->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
    $this->AddFont('Montserrat-Light', '', 'Montserrat-Light.php');
    $this->AddFont('Montserrat-Thin', '', 'Montserrat-Thin.php');

    $this->SetFont('Montserrat-ExtraBold', '', 12);
    $this->Cell(70.59, 6,'TEXT 1', 0, 1, 'L');
    $this->SetFont('Montserrat-Medium', '', 12);
    $this->Cell(70.59, 6,'TEXT 2', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 3', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 4', 0, 1, 'L');
    
    $this->Ln(10);

    $this->SetFont('Montserrat-Regular', '', 10);
    $this->Cell(70.59, 6,'TEXT 5', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 6', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 7', 0, 0, 'L');

    $this->SetFont('Montserrat-Regular', '', 32);
    $this->Cell(128, 6,'HEADER TEXT', 0, 1, 'R');

    $this->SetFont('Montserrat-Regular', '', 10);
    $this->Cell(70.59, 6,'TEXT 8', 0, 1, 'L');

    $this->Line(204, 65, 7.06, 65);
    $this->Ln(10);

}

function Footer() {

    $this->SetY(-25);

    $this->Image('img/footer_bg.png', 0, 265.6, 209.97, 31.22);
    $this->Image('img/icon_telefon.png', 7.06, 274, 6, 6);
    $this->Image('img/icon_email.png', 7.06, 284, 6, 6);
    $this->Image('img/icon_magazin.png', 73, 278.5, 6, 6);

    $this->SetFont('Montserrat-ExtraBold', '', 11);
   
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "      TEXT 1", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "   TEXT 2", 0, 0);

    $this->SetFont('Montserrat-ExtraBold', '', 16);

    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "   TEXT 4", 0, 1);
    $this->Cell(70, 2, "", 0, 0);

    $this->SetFont('Montserrat-ExtraBold', '', 11);

    $this->Cell(70, 2, "   TEXT 5", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "      TEXT 6", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);

}

}

$pdf = new PDF('P', 'mm', array(209.97, 296.97));

$pdf->SetLeftMargin(7.06);
$pdf->SetRightMargin(7.06);
$pdf->SetTopMargin(4.3);

$pdf->AddPage();

$pdf->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
$pdf->AddFont('Montserrat-Regular', 'B', 'Montserrat-Medium.php');
$pdf->SetFont('Montserrat-Regular', '', 10);

$table=new easyTable($pdf, '{10, 85, 60, 15, 15, 15}','align:C; border:1; border-color:#b6babc; split-row: true;');
$table->rowStyle('align:{CCCCCC}; valign:M; bgcolor:#e4e6e7; font-color:#363636;');
$table->easyCell('RT 1');
$table->easyCell('RT 2');
$table->easyCell('RT 3');
$table->easyCell('RT 4');
$table->easyCell('RT 5');
$table->easyCell('RT 6');
$table->printRow(true);

for ($i=1;$i<=2;$i++) {

    $table->rowStyle('align:{CLCCCC}; valign:M; bgcolor:#ffffff; font-color:#363636; paddingY:3;');
    $table->easyCell('1', 'rowspan:2');
    $table->easyCell(iconv('UTF-8', 'iso-8859-1', "<b>Lorem Ipsum is simply dummy text 
    of the printing and typesetting industry. </b>

    Lorem Îpsum has been the industrys
    standard dummy text ever
    since the 1500s, when an unknown
    printer took a galley of type and
    scrambled it to make a type
    specimen book. It has survived
    not only five centuries,
    but also the leap into
    electronic typesetting
    standard dummy text ever
    Lorem Îpsum has been the industrys
    standard dummy text ever
    since the 1500s, when an unknown
    printer took a galley of type and
    scrambled it to make a type
    specimen book. It has survived
    not only five centuries,
    but also the leap into
    electronic typesetting
    standard dummy text ever
    specimen book. It has survived
    not only five centuries,
    "), 'rowspan:2');
    $table->easyCell('', 'img:img/p0.jpg, w60; valign:T; align:C');
    $table->easyCell('99999', 'rowspan:2');
    $table->easyCell('99999', 'rowspan:2');
    $table->easyCell('99999', 'rowspan:2');
    $table->printRow();
    $table->rowStyle('align:{C}; valign:M; bgcolor:#e4e6e7; font-color:#363636; paddingY:3;');
    $table->easyCell('<s "href:https://example.com">TEXT LINK</s>');
    $table->printRow();

}

$table->endTable(100);

$pdf->Output();

HTML convertion and space between paragraphs

Hi ,

I've noticed that while using the iibrary (I can't remember if I had the issue with plain fpfd ) the produced space between html
converted paragraphs inside a cell is too big . Is there any way to control it this space (as in html/css for example where you can
set a margin ) ?

Thanks

printRow(true) - table header printed twice on one page.

I have content taking whole first page (most often) and main table starts on second page, but unfortunately when parameter setAsHeader is set to true I'm getting doubled header on second page of the document (which is first page of the table).
If I set setAsHeader to false I have only one header, but no headers on other pages.

Actually as I tested just now - The issue depends on the position where table starts on second (or any other page).
And occurs only when another table ends on previous page.

So to reproduce error you need two tables - one taking first page and second starting on top of page two with setAsHeader switched on.

If new table starts from top of the page (not first one), its header on that page will be doubled. If there is anything overlapping from previous page - than it wont be doubled.

Okay so here is the example:

	$toolingtable=new easyTable($pdf, '{20, 20, 60, 50, 30, 20}', 'border-color:#c8c8c8; valign:M; font-size:11; border:1; paddingY:2;');
	$toolingtable->rowStyle('align:{CCCCCC}; bgcolor:#c8c8c8;font-style:B');
	$toolingtable->easyCell("Header", 'colspan:3;align:L;');
	$toolingtable->easyCell("(Header as well)", 'colspan:3;font-size:9;align:R');
	$toolingtable->printRow();
	$toolingtable->easyCell("", 'colspan:5;border-color:#FFFFFF;bgcolor:#FFFFFF;');
	$toolingtable->printRow();
	$toolingtable->rowStyle('align:{CCCCCC}; bgcolor:#c8c8c8;font-style:B');
	$toolingtable->easyCell("1");
	$toolingtable->easyCell(" 2");
	$toolingtable->easyCell("3", 'colspan:2;');
	$toolingtable->easyCell("4");
	$toolingtable->easyCell("5");
	$toolingtable->printRow();
	for($i=0;$i<75;$i++) {
		$style = ($i % 2 == 0) ? 'ffffff' : 'eeeeee'; 
		$toolingtable->rowStyle('align:{LLLL}; border-color:#c8c8c8;bgcolor:#'.$style.'');
		$toolingtable->easyCell($Tools['1'][$i]);
		$toolingtable->easyCell($Tools['2'][$i]);
		$toolingtable->easyCell($Tools['3'][$i], 'colspan:2;');
		$toolingtable->easyCell($Tools['4'][$i]);
		$toolingtable->easyCell($Tools['5'][$i]);
		$toolingtable->printRow();
	}

	// If new page will start here, the problem with table below will occur and header will be printed twice. 

	$toolingtable->endTable(0);
	$operations = new easyTable($pdf, '{10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10}', 'border-color:#c8c8c8; valign:M; font-size:11; border:1; paddingY:2;');
	$operations->rowStyle('align:{CCCCCC}; bgcolor:#c8c8c8;font-style:B');
	$operations->easyCell("11", 'colspan:2;');
	$operations->easyCell("22", 'colspan:12;');
	$operations->easyCell('33'colspan:6;align:R;');
	$operations->printRow(true);
	for($i=0;$i<55;$i++) {
		$operations->rowStyle('align:{LLLL}; border-color:#c8c8c8;');
		$operations->easyCell($Tooling['11'][$i]);
		$operations->easyCell($Tooling['22'][$i]);
		$operations->easyCell($Tooling['33'][$i], 'colspan:16;');
		$operations->easyCell($Tooling['44'][$i]);
		$operations->easyCell($Tooling['55'][$i]);
		$operations->printRow();
		$operations->rowStyle('align:{LLLL}; border-color:#c8c8c8;');
		$operations->easyCell($Tooling['Description'][$i], 'colspan:20;');

		$operations->printRow();
	}
	$operations->endTable(10);

Workaround for that problem is a separator - but it must be real separator that will be printed out. So repositioning the cursor won't help.
What worked for me was simple

$pdf->Write(5, " ");

But as I said there must be something printed out, so without space it wont work.

$pdf->Write(5, "");

Using printRow() in Header()

Hi,

I have to output a header whose content is varying depending on the 1st row of the page content, and which is formatted via easyCell.

I have to use printRow() to output my header, but it does not seems to work: something is looping somewhere.

Any idea how to solve this problem?

Regards,
Michel.

Does not handle units other than mm

My fpdf objects are constructed with inches like new FDPF('P', 'in', 'Letter');

When calculating the width of cells easytable does not take into account the scale factor ($this->k on FPDF). I'm sure its missing in a few other places as well. Using percentages for cell width also does not work.

tFPDF support

Hey, are there any plans to support tFPDF? I couldn't find anything in the repository. Thx in advance.

Underline

Hi,

$table->easyCell('<s "font-style:U;">xxx</s>'); does not seem to work :(

Any idea?
Michel.

loading template using fpdi

am trying to load a custom template using fpdi, am stuck. the page loads without error but with no template. kindly assist.

class PDF extends FPDI
{
protected $_tplIdx;

public function Header()
{
    if (null === $this->_tplIdx) {
        $this->setSourceFile('templ/trans.pdf');
        $this->_tplIdx = $this->importPage(1);
    }

    $this->useTemplate($this->_tplIdx);
}

}

$pdf = new PDF();

$pdf=new exFPDF('P','mm','A4');
$pdf->AddPage();
$pdf->SetMargins(20, 25, 30);

split-row: true with printRow setAsHeader also true

Hello, i will get to the point.

If split-row is set to true and the printRow setAsHeader parameter is also set to true, it wont show the persistent header. Any idea why?

Here's a screen capture of the problem
p2

Here's my code:

require('fpdf.php');
require('exfpdf.php');
require('easyTable.php');

class PDF extends exFPDF {

function Header()
{   
    
    $this->Image('img/header_bg.png', 0, 0, 209.97, 58.42);
    $this->Image('img/logo0.png', 166.02, 4.13, 36.9, 36.51);
   
    $this->AddFont('Montserrat-ExtraBold', '', 'Montserrat-ExtraBold.php');
    $this->AddFont('Montserrat-Medium', '', 'Montserrat-Medium.php');
    $this->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
    $this->AddFont('Montserrat-Light', '', 'Montserrat-Light.php');
    $this->AddFont('Montserrat-Thin', '', 'Montserrat-Thin.php');

    $this->SetFont('Montserrat-ExtraBold', '', 12);
    $this->Cell(70.59, 6,'TEXT 1', 0, 1, 'L');
    $this->SetFont('Montserrat-Medium', '', 12);
    $this->Cell(70.59, 6,'TEXT 2', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 3', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 4', 0, 1, 'L');
    
    $this->Ln(10);

    $this->SetFont('Montserrat-Regular', '', 10);
    $this->Cell(70.59, 6,'TEXT 5', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 6', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 7', 0, 0, 'L');

    $this->SetFont('Montserrat-Regular', '', 32);
    $this->Cell(128, 6,'HEADER TEXT', 0, 1, 'R');

    $this->SetFont('Montserrat-Regular', '', 10);
    $this->Cell(70.59, 6,'TEXT 8', 0, 1, 'L');

    $this->Line(204, 65, 7.06, 65);
    $this->Ln(10);

}

function Footer() {

    $this->SetY(-25);

    $this->Image('img/footer_bg.png', 0, 265.6, 209.97, 31.22);
    $this->Image('img/icon_telefon.png', 7.06, 274, 6, 6);
    $this->Image('img/icon_email.png', 7.06, 284, 6, 6);
    $this->Image('img/icon_magazin.png', 73, 278.5, 6, 6);

    $this->SetFont('Montserrat-ExtraBold', '', 11);
   
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "      TEXT 1", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "   TEXT 2", 0, 0);

    $this->SetFont('Montserrat-ExtraBold', '', 16);

    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "   TEXT 4", 0, 1);
    $this->Cell(70, 2, "", 0, 0);

    $this->SetFont('Montserrat-ExtraBold', '', 11);

    $this->Cell(70, 2, "   TEXT 5", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "      TEXT 6", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);

}

}

$pdf = new PDF('P', 'mm', array(209.97, 296.97));

$pdf->SetLeftMargin(7.06);
$pdf->SetRightMargin(7.06);
$pdf->SetTopMargin(4.3);

$pdf->AddPage();

$pdf->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
$pdf->AddFont('Montserrat-Regular', 'B', 'Montserrat-Medium.php');
$pdf->SetFont('Montserrat-Regular', '', 10);

$table=new easyTable($pdf, '{10, 85, 60, 15, 15, 15}','align:C; border:1; border-color:#b6babc; split-row: true;');
$table->rowStyle('align:{CCCCCC}; valign:M; bgcolor:#e4e6e7; font-color:#363636;');
$table->easyCell('RT 1');
$table->easyCell('RT 2');
$table->easyCell('RT 3');
$table->easyCell('RT 4');
$table->easyCell('RT 5');
$table->easyCell('RT 6');
$table->printRow(true);

for ($i=1;$i<=2;$i++) {

    $table->rowStyle('align:{CLCCCC}; valign:M; bgcolor:#ffffff; font-color:#363636; paddingY:3;');
    $table->easyCell('1', 'rowspan:2');
    $table->easyCell(iconv('UTF-8', 'iso-8859-1', "<b>Lorem Ipsum is simply dummy text 
    of the printing and typesetting industry. </b>

    Lorem Îpsum has been the industrys
    standard dummy text ever
    since the 1500s, when an unknown
    printer took a galley of type and
    scrambled it to make a type
    specimen book. It has survived
    not only five centuries,
    but also the leap into
    electronic typesetting
    standard dummy text ever
    Lorem Îpsum has been the industrys
    standard dummy text ever
    since the 1500s, when an unknown
    printer took a galley of type and
    scrambled it to make a type
    specimen book. It has survived
    not only five centuries,
    but also the leap into
    electronic typesetting
    standard dummy text ever
    specimen book. It has survived
    not only five centuries,
    "), 'rowspan:2');
    $table->easyCell('', 'img:img/p0.jpg, w60; valign:T; align:C');
    $table->easyCell('99999', 'rowspan:2');
    $table->easyCell('99999', 'rowspan:2');
    $table->easyCell('99999', 'rowspan:2');
    $table->printRow();
    $table->rowStyle('align:{C}; valign:M; bgcolor:#e4e6e7; font-color:#363636; paddingY:3;');
    $table->easyCell('<s "href:https://example.com">TEXT LINK</s>');
    $table->printRow();

}

$table->endTable(100);

$pdf->Output();

Easytable not working in remote server

Hi everyone, i tried to generate a pdf using fpdf & easytable, i ran the php file in my local server, it works perfectly but i couldn't find the output in remote server, no error is shown just a blank screen is popping up, please do help me rectify this issue

$current_font is deprecated in exfpdf.php

Hello,

Could you help me to solve this issue which raised when going to PHP 8.2?
`
[27-Apr-2023 17:28:26 Europe/Paris] PHP Deprecated: Creation of dynamic property hdrPDF::$current_font is deprecated in …inc/fpdf/exfpdf.php on line 286

[27-Apr-2023 17:28:34 Europe/Paris] PHP Deprecated: Creation of dynamic property exFPDF::$current_font is deprecated in …inc/fpdf/exfpdf.php on line 286
`

Kind regards,
Michel.

Newline in easyCell

Hi,

Newlines in the text of easyCell() generates a bad display in the Pdf file.

$table->easyCell(utf8_decode('<s "font-size:10;">EN SOUMETTANT…CI-DESSOUS.

<b>Conditions…</b>

En vous inscr…'), 'border:TLBR; colspan:5;');
	$table->printRow();

gives this (with Microsoft IE11, Microsoft Edge and Adobe Reader, but not with Google Chrome):
image

Copying the newline character, it gives hex 0D0A.

Using aaa\nbbb explicitly does not solve the problem because the text aaa\naaa appear as is when displaying the Pdf.

Thanks helping me to avoid these unrecognized characters.
Michel.

table overlaps footer

Hello, i will get to the point.

Is there a solution to set a bottom margin to the table? or to limit the height? but also have the split-row: true in mind.

Here's a screen capture of the problem
p3

Here's my code:

require('fpdf.php');
require('exfpdf.php');
require('easyTable.php');

class PDF extends exFPDF {

function Header()
{   
    
    $this->Image('img/header_bg.png', 0, 0, 209.97, 58.42);
    $this->Image('img/logo0.png', 166.02, 4.13, 36.9, 36.51);
   
    $this->AddFont('Montserrat-ExtraBold', '', 'Montserrat-ExtraBold.php');
    $this->AddFont('Montserrat-Medium', '', 'Montserrat-Medium.php');
    $this->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
    $this->AddFont('Montserrat-Light', '', 'Montserrat-Light.php');
    $this->AddFont('Montserrat-Thin', '', 'Montserrat-Thin.php');

    $this->SetFont('Montserrat-ExtraBold', '', 12);
    $this->Cell(70.59, 6,'TEXT 1', 0, 1, 'L');
    $this->SetFont('Montserrat-Medium', '', 12);
    $this->Cell(70.59, 6,'TEXT 2', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 3', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 4', 0, 1, 'L');
    
    $this->Ln(10);

    $this->SetFont('Montserrat-Regular', '', 10);
    $this->Cell(70.59, 6,'TEXT 5', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 6', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 7', 0, 0, 'L');

    $this->SetFont('Montserrat-Regular', '', 32);
    $this->Cell(128, 6,'HEADER TEXT', 0, 1, 'R');

    $this->SetFont('Montserrat-Regular', '', 10);
    $this->Cell(70.59, 6,'TEXT 8', 0, 1, 'L');

    $this->Line(204, 65, 7.06, 65);
    $this->Ln(10);

}

function Footer() {

    $this->SetY(-25);

    $this->Image('img/footer_bg.png', 0, 265.6, 209.97, 31.22);
    $this->Image('img/icon_telefon.png', 7.06, 274, 6, 6);
    $this->Image('img/icon_email.png', 7.06, 284, 6, 6);
    $this->Image('img/icon_magazin.png', 73, 278.5, 6, 6);

    $this->SetFont('Montserrat-ExtraBold', '', 11);
   
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "      TEXT 1", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "   TEXT 2", 0, 0);

    $this->SetFont('Montserrat-ExtraBold', '', 16);

    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "   TEXT 4", 0, 1);
    $this->Cell(70, 2, "", 0, 0);

    $this->SetFont('Montserrat-ExtraBold', '', 11);

    $this->Cell(70, 2, "   TEXT 5", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "      TEXT 6", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);

}

}

$pdf = new PDF('P', 'mm', array(209.97, 296.97));

$pdf->SetLeftMargin(7.06);
$pdf->SetRightMargin(7.06);
$pdf->SetTopMargin(4.3);

$pdf->AddPage();

$pdf->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
$pdf->AddFont('Montserrat-Regular', 'B', 'Montserrat-Medium.php');
$pdf->SetFont('Montserrat-Regular', '', 10);

$table=new easyTable($pdf, '{10, 85, 60, 15, 15, 15}','align:C; border:1; border-color:#b6babc; split-row: true;');
$table->rowStyle('align:{CCCCCC}; valign:M; bgcolor:#e4e6e7; font-color:#363636;');
$table->easyCell('RT 1');
$table->easyCell('RT 2');
$table->easyCell('RT 3');
$table->easyCell('RT 4');
$table->easyCell('RT 5');
$table->easyCell('RT 6');
$table->printRow(true);

for ($i=1;$i<=2;$i++) {

    $table->rowStyle('align:{CLCCCC}; valign:M; bgcolor:#ffffff; font-color:#363636; paddingY:3;');
    $table->easyCell('1', 'rowspan:2');
    $table->easyCell(iconv('UTF-8', 'iso-8859-1', "<b>Lorem Ipsum is simply dummy text 
    of the printing and typesetting industry. </b>

    Lorem Îpsum has been the industrys
    standard dummy text ever
    since the 1500s, when an unknown
    printer took a galley of type and
    scrambled it to make a type
    specimen book. It has survived
    not only five centuries,
    but also the leap into
    electronic typesetting
    standard dummy text ever
    Lorem Îpsum has been the industrys
    standard dummy text ever
    since the 1500s, when an unknown
    printer took a galley of type and
    scrambled it to make a type
    specimen book. It has survived
    not only five centuries,
    but also the leap into
    electronic typesetting
    standard dummy text ever
    specimen book. It has survived
    not only five centuries,
    "), 'rowspan:2');
    $table->easyCell('', 'img:img/p0.jpg, w60; valign:T; align:C');
    $table->easyCell('99999', 'rowspan:2');
    $table->easyCell('99999', 'rowspan:2');
    $table->easyCell('99999', 'rowspan:2');
    $table->printRow();
    $table->rowStyle('align:{C}; valign:M; bgcolor:#e4e6e7; font-color:#363636; paddingY:3;');
    $table->easyCell('<s "href:https://example.com">TEXT LINK</s>');
    $table->printRow();

}

$table->endTable(100);

$pdf->Output();

image is cut on next page when cant fit

Hello,

First of all, thank you for your fixes and your awesome work!

I'll get straight to the point.

If some text is on the first page and the image cannot fit into the desired place, it will appear cut on the next page.

cut image

This is the image i used:

p0

Here is my code:

require('fpdf.php');
require('exfpdf.php');
require('easyTable.php');

class PDF extends exFPDF {

function Header()
{   
    
    $this->Image('img/header_bg.png', 0, 0, 209.97, 58.42);
    $this->Image('img/logo0.png', 166.02, 4.13, 36.9, 36.51);
   
    $this->AddFont('Montserrat-ExtraBold', '', 'Montserrat-ExtraBold.php');
    $this->AddFont('Montserrat-Medium', '', 'Montserrat-Medium.php');
    $this->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
    $this->AddFont('Montserrat-Light', '', 'Montserrat-Light.php');
    $this->AddFont('Montserrat-Thin', '', 'Montserrat-Thin.php');

    $this->SetFont('Montserrat-ExtraBold', '', 12);
    $this->Cell(70.59, 6,'TEXT 1', 0, 1, 'L');
    $this->SetFont('Montserrat-Medium', '', 12);
    $this->Cell(70.59, 6,'TEXT 2', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 3', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 4', 0, 1, 'L');
    
    $this->Ln(10);

    $this->SetFont('Montserrat-Regular', '', 10);
    $this->Cell(70.59, 6,'TEXT 5', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 6', 0, 1, 'L');
    $this->Cell(70.59, 6,'TEXT 7', 0, 0, 'L');

    $this->SetFont('Montserrat-Regular', '', 32);
    $this->Cell(128, 6,'HEADER TEXT', 0, 1, 'R');

    $this->SetFont('Montserrat-Regular', '', 10);
    $this->Cell(70.59, 6,'TEXT 8', 0, 1, 'L');

    $this->Line(204, 65, 7.06, 65);
    $this->Ln(10);

}

function Footer() {

    $this->SetY(-25);

    $this->Image('img/footer_bg.png', 0, 265.6, 209.97, 31.22);
    $this->Image('img/icon_telefon.png', 7.06, 274, 6, 6);
    $this->Image('img/icon_email.png', 7.06, 284, 6, 6);
    $this->Image('img/icon_magazin.png', 73, 278.5, 6, 6);

    $this->SetFont('Montserrat-ExtraBold', '', 11);
   
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "      TEXT 1", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "   TEXT 2", 0, 0);

    $this->SetFont('Montserrat-ExtraBold', '', 16);

    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "   TEXT 4", 0, 1);
    $this->Cell(70, 2, "", 0, 0);

    $this->SetFont('Montserrat-ExtraBold', '', 11);

    $this->Cell(70, 2, "   TEXT 5", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "      TEXT 6", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 0);
    $this->Cell(70, 2, "", 0, 1);

}

}

$pdf = new PDF('P', 'mm', array(209.97, 296.97));

$pdf->SetLeftMargin(7.06);
$pdf->SetRightMargin(7.06);
$pdf->SetTopMargin(4.3);

$pdf->AddPage();

$pdf->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
$pdf->AddFont('Montserrat-Regular', 'B', 'Montserrat-Medium.php');
$pdf->SetFont('Montserrat-Regular', '', 10);

$table=new easyTable($pdf, '{10, 85, 60, 15, 15, 15}','align:C; border:1; border-color:#b6babc; split-row: true;');
$table->rowStyle('align:{CCCCCC}; valign:M; bgcolor:#e4e6e7; font-color:#363636;');
$table->easyCell('RT 1');
$table->easyCell('RT 2');
$table->easyCell('RT 3');
$table->easyCell('RT 4');
$table->easyCell('RT 5');
$table->easyCell('RT 6');
$table->printRow(true);

for ($i=1;$i<=22;$i++) {

    $table->rowStyle('align:{CLCCCC}; valign:M; bgcolor:#ffffff; font-color:#363636; paddingY:3;');
    $table->easyCell('1', 'rowspan:2');
    $table->easyCell(iconv('UTF-8', 'iso-8859-1', "<b>Lorem Ipsum is simply dummy text 
    of the printing and typesetting industry. </b>

    Lorem Îpsum has been the industrys
    standard dummy text ever
    since the 1500s, when an unknown
    printer took a galley of type and
    scrambled it to make a type
    specimen book. It has survived
    not only five centuries,
    but also the leap into
    electronic typesetting
    standard dummy text ever
    Lorem Îpsum has been the industrys
    standard dummy text ever
    since the 1500s, when an unknown
    printer took a galley of type and
    scrambled it to make a type
    specimen book. It has survived
    not only five centuries,
    but also the leap into
    electronic typesetting
    standard dummy text ever
    specimen book. It has survived
    not only five centuries,
    "), 'rowspan:2');
    $table->easyCell('', 'img:img/p0.jpg, w60; valign:T; align:C');
    $table->easyCell('99999', 'rowspan:2');
    $table->easyCell('99999', 'rowspan:2');
    $table->easyCell('99999', 'rowspan:2');
    $table->printRow();
    $table->rowStyle('align:{C}; valign:M; bgcolor:#e4e6e7; font-color:#363636; paddingY:3;');
    $table->easyCell('<s "href:https://example.com">TEXT LINK</s>');
    $table->printRow();

}

$table->endTable(100);

$pdf->Output();

image is cut on next page when cant fit

Hello,

First of all, thank you for your fixes and your awesome work!

I'll get straight to the point.

If some text is on the first page and the image cannot fit into the desired place, it will appear cut on the next page.

cut image

This is the image i used:

p0

Here is my code:

`
require('fpdf.php');
require('exfpdf.php');
require('easyTable.php');

class PDF extends exFPDF {

function Header()
{

$this->Image('img/header_bg.png', 0, 0, 209.97, 58.42);
$this->Image('img/logo0.png', 166.02, 4.13, 36.9, 36.51);

$this->AddFont('Montserrat-ExtraBold', '', 'Montserrat-ExtraBold.php');
$this->AddFont('Montserrat-Medium', '', 'Montserrat-Medium.php');
$this->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
$this->AddFont('Montserrat-Light', '', 'Montserrat-Light.php');
$this->AddFont('Montserrat-Thin', '', 'Montserrat-Thin.php');

$this->SetFont('Montserrat-ExtraBold', '', 12);
$this->Cell(70.59, 6,'TEXT 1', 0, 1, 'L');
$this->SetFont('Montserrat-Medium', '', 12);
$this->Cell(70.59, 6,'TEXT 2', 0, 1, 'L');
$this->Cell(70.59, 6,'TEXT 3', 0, 1, 'L');
$this->Cell(70.59, 6,'TEXT 4', 0, 1, 'L');

$this->Ln(10);

$this->SetFont('Montserrat-Regular', '', 10);
$this->Cell(70.59, 6,'TEXT 5', 0, 1, 'L');
$this->Cell(70.59, 6,'TEXT 6', 0, 1, 'L');
$this->Cell(70.59, 6,'TEXT 7', 0, 0, 'L');

$this->SetFont('Montserrat-Regular', '', 32);
$this->Cell(128, 6,'HEADER TEXT', 0, 1, 'R');

$this->SetFont('Montserrat-Regular', '', 10);
$this->Cell(70.59, 6,'TEXT 8', 0, 1, 'L');

$this->Line(204, 65, 7.06, 65);
$this->Ln(10);

}

function Footer() {

$this->SetY(-25);

$this->Image('img/footer_bg.png', 0, 265.6, 209.97, 31.22);
$this->Image('img/icon_telefon.png', 7.06, 274, 6, 6);
$this->Image('img/icon_email.png', 7.06, 284, 6, 6);
$this->Image('img/icon_magazin.png', 73, 278.5, 6, 6);

$this->SetFont('Montserrat-ExtraBold', '', 11);

$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 1);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 1);
$this->Cell(70, 2, "      TEXT 1", 0, 0);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 1);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "   TEXT 2", 0, 0);

$this->SetFont('Montserrat-ExtraBold', '', 16);

$this->Cell(70, 2, "", 0, 1);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "   TEXT 4", 0, 1);
$this->Cell(70, 2, "", 0, 0);

$this->SetFont('Montserrat-ExtraBold', '', 11);

$this->Cell(70, 2, "   TEXT 5", 0, 0);
$this->Cell(70, 2, "", 0, 1);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 1);
$this->Cell(70, 2, "      TEXT 6", 0, 0);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 1);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 1);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 0);
$this->Cell(70, 2, "", 0, 1);

}

}

$pdf = new PDF('P', 'mm', array(209.97, 296.97));

$pdf->SetLeftMargin(7.06);
$pdf->SetRightMargin(7.06);
$pdf->SetTopMargin(4.3);

$pdf->AddPage();

$pdf->AddFont('Montserrat-Regular', '', 'Montserrat-Regular.php');
$pdf->AddFont('Montserrat-Regular', 'B', 'Montserrat-Medium.php');
$pdf->SetFont('Montserrat-Regular', '', 10);

$table=new easyTable($pdf, '{10, 85, 60, 15, 15, 15}','align:C; border:1; border-color:#b6babc; split-row: true;');
$table->rowStyle('align:{CCCCCC}; valign:M; bgcolor:#e4e6e7; font-color:#363636;');
$table->easyCell('RT 1');
$table->easyCell('RT 2');
$table->easyCell('RT 3');
$table->easyCell('RT 4');
$table->easyCell('RT 5');
$table->easyCell('RT 6');
$table->printRow(true);

for ($i=1;$i<=22;$i++) {

$table->rowStyle('align:{CLCCCC}; valign:M; bgcolor:#ffffff; font-color:#363636; paddingY:3;');
$table->easyCell('1', 'rowspan:2');
$table->easyCell(iconv('UTF-8', 'iso-8859-1', "<b>Lorem Ipsum is simply dummy text 
of the printing and typesetting industry. </b>

Lorem Îpsum has been the industrys
standard dummy text ever
since the 1500s, when an unknown
printer took a galley of type and
scrambled it to make a type
specimen book. It has survived
not only five centuries,
but also the leap into
electronic typesetting
standard dummy text ever
Lorem Îpsum has been the industrys
standard dummy text ever
since the 1500s, when an unknown
printer took a galley of type and
scrambled it to make a type
specimen book. It has survived
not only five centuries,
but also the leap into
electronic typesetting
standard dummy text ever
specimen book. It has survived
not only five centuries,
"), 'rowspan:2');
$table->easyCell('', 'img:img/p0.jpg, w60; valign:T; align:C');
$table->easyCell('99999', 'rowspan:2');
$table->easyCell('99999', 'rowspan:2');
$table->easyCell('99999', 'rowspan:2');
$table->printRow();
$table->rowStyle('align:{C}; valign:M; bgcolor:#e4e6e7; font-color:#363636; paddingY:3;');
$table->easyCell('<s "href:https://example.com">TEXT LINK</s>');
$table->printRow();

}

$table->endTable(100);

$pdf->Output();`

Text Decoration Style

Hello, is it possible for this library to add styles to the text-decoration section? I want the strike-through text or in CSS it is called text-decoration: line-through;
Can this library add a text decoration feature?
Thanks for all the answers

Image from url

Hi thank for this great library.

How do I put image from url?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.