PHP
downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

PDF_fit_textflow> <PDF_fit_pdi_page
Last updated: Fri, 10 Oct 2008

view this page in

PDF_fit_table

(PECL pdflib:2.1.0-2.1.3)

PDF_fit_tablePlace table on page

Description

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, 10 Oct 2008
 
add a note add a note User Contributed Notes
PDF_fit_table
Christian
07-Mar-2008 05:50
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 10:18
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 10:05
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, 10 Oct 2008
 
 
show source | credits | sitemap | contact | advertising | mirror sites