PDF_fit_textflow> <PDF_fit_pdi_page
Last updated: Fri, 24 Feb 2012

PDF_fit_table

(PECL pdflib >= 2.1.0)

PDF_fit_tablePlace table on page

Descrição

string PDF_fit_table ( resource $pdfdoc , int $table , float $llx , float $lly , float $urx , float $ury , string $optlist )

Places a table on the page fully or partially.



PDF_fit_textflow> <PDF_fit_pdi_page
Last updated: Fri, 24 Feb 2012
 
User Contributed Notes
PDF_fit_table
syn4k
04-Jun-2009 07:22
Christian's example doesn't actually work. Fatal errors everywhere.
Christian
07-Mar-2008 11:20
An easy example:

$p = new PDFlib();
$p->begin_document("", "destination={page=1 type=fixed zoom=1 left=50}");

$optlist_left = "fittextline={font=".$font." fontsize=10 position={left center}}";
$optlist_right = "fittextline={font=".$font." fontsize=10 position={right center}} colwidth=80";
$t2 = $p->add_table_cell($t2,1,1,"Kunden Nr.:",$optlist_left);
$t2 = $p->add_table_cell($t2,2,1,$kunde->getID(),$optlist_right);
$t2 = $p->add_table_cell($t2,1,2,"USt-IdNr.:",$optlist_left);
$t2 = $p->add_table_cell($t2,2,2,"DE257874950",$optlist_right);
$t2 = $p->add_table_cell($t2,1,3,"Datum:",$optlist_left);
$t2 = $p->add_table_cell($t2,2,3,date("d.m.Y"),$optlist_right);
$optlist = "showgrid=false";
$p->fit_table($t2,385,550,520,650,$optlist);

$p->end_page_ext("");

$p->end_document("");

$buf = $p->get_buffer();
$len = strlen($buf);

header("Content-type: application/pdf");
header("Content-Length: $len");
header("Content-Disposition: inline; filename=hello.pdf");
print $buf;
tatlar at yahoo dot com
15-Aug-2007 03:48
Regarding my previous note - this method is only available if you have the fully licensed PDFlib installed. PDFlib Lite does not include this method. Feature comparison here: http://www.pdflib.com/products/pdflib-family/feature-comparison/
tatlar at yahoo dot com
15-Aug-2007 03:35
AFAIK this PDF method does not currently exist in PHP5. I have installed PDFlib GmbH  (v 6.0.3) and PECL (v 2.1.1) and all the other methods documented work well. From the Apache error log:

[error] PHP Fatal error:  Call to undefined method PDFlib::fit_table()

HTH someone - I needed to make a table with PDFlib and had to give up.

PDF_fit_textflow> <PDF_fit_pdi_page
Last updated: Fri, 24 Feb 2012