$table->setcolspacingwidth(50);
$table->setcolspacingcolor(false);
$table->setrowspacingwidth(10);
$table->setrowspacingcolor(false);
$table->setbgcolors(array(false));
/* Fill up the table cell by cell from the left to the right
   by calling the addcell() method

   The table is entirely made up out of containers, so that each
   cell can contain more than one object (2 text objects and
   1 barcode object in this case)

   Note that the containers consist of 3 objects but only 2
   pieces of data are passed via the array; in this case the
   last element of the array is used for the remaining objects */
$table->addcell(array("Monday", "1111"));
$table->addcell(array("Tuesday", "2222"));
$table->addcell(array("Wednesday", "3333"));
$table->addcell(array("Thursday", "4444"));
$table->addcell(array("Friday", "5555"));
$table->addcell(array("Saturday", "6666"));
$table->addcell(array("Sunday", "7777"));
/* Close the table (important!) */
$table->endtable();
/* Close the last page */
PDF_end_page($pdf);
/* Close the PDF document */
PDF_close($pdf);
/* Output the current part of the in-memory created PDF document */
print PDF_get_buffer($pdf);
/* Delete the PDFlib object */
$table->settopborderwidth(0);
$table->setbottomborderwidth(0);
$table->setcolspacingwidth(0);
$table->setcolspacingcolor(false);
$table->setrowspacingwidth(0);
$table->setrowspacingcolor(false);
$table->setbgcolors(array(false));
$table->setverttableborderwidth(0);
/* Fill up the table cell by cell from the left to the right
   by calling the addcell() method

   The table is entirely made up out of containers, so that each
   cell can contain more than one object (2 text objects and
   1 barcode object in this case)

   Note that the containers consist of 3 objects but only 2
   pieces of data are passed via the array; in this case the
   last element of the array is used for the remaining objects */
foreach ($articles as $art) {
    $table->addcell(array($art[0], $art[0], $art[1]));
}
/* Close the table (important!) */
$table->endtable();
/* Close the last page */
PDF_end_page($pdf);
/* Close the PDF document */
PDF_close($pdf);
/* Output the current part of the in-memory created PDF document */
print PDF_get_buffer($pdf);
/* Delete the PDFlib object */
PDF_delete($pdf);