fpdf-easytable / fpdf-easytable Goto Github PK
View Code? Open in Web Editor NEWfpdf-easyTable is a PHP class that makes it easy to build tables for PDF documents generated with the FPDF library
License: The Unlicense
fpdf-easyTable is a PHP class that makes it easy to build tables for PDF documents generated with the FPDF library
License: The Unlicense
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.
This is the image i used:
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();
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.
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 ?
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):
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.
I am unable to run EasyTable on remote server. The php version is 5.6 I have also tried with php 7.0
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.
Hi,
$table->easyCell('<s "font-style:U;">xxx</s>');
does not seem to work :(
Any idea?
Michel.
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>';
?>`
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
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?
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);
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?
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
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
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
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();
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
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 <
could be solutions, specially the 2d one to have the possibility to insert
…
Thanks,
Michel.
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
I used following command to install "composer install fpdf-easytable/fpdf-easytable -vvv" on terminal mode.
I think we need to enable some enhancements...
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
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();
does not render easytable that covers more than one page in pdf that has an easytable in the Header () function
for new users (like me) who run into this error, should check exfpdf.php line 10 include 'fpdf.php'; and modify the path to where fdpf.php is ,mine is include 'fpdf/fpdf.php';
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>
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
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 ').
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);
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.
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
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, "");
Could you please add feature that will make it possible to split rows between pages so that the row isn't cut in half when it overlap to next page but is whole on next page?
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
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);
}
}
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
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.
This is the image i used:
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();`
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
Hey, are there any plans to support tFPDF? I couldn't find anything in the repository. Thx in advance.
I am getting this error trying to get the basic_example.php to work.
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
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();
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.
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
Hi thank for this great library.
How do I put image from url?
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.
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.