suttercain Posted September 11, 2007 Share Posted September 11, 2007 Hi everyone, I found a class online that allows you to convert an array to a PDF document, formating them for AVERY label. I got it working and have formatted them to fit with the 3170 template. My issue is I would like to style the information that is being echoed in the pdf document. Currently it just takes the two lines of data and places them to the top/left. I would like to Center the text text-align:center; and make one line of text larger. Anyone know how to do this? The info is being generated to the pdf labels via the sprintf() function: $pdf = new PDF_Label('5160', 'in', 1, 2); $pdf->Open(); $pdf->AddPage(); $sql = mysql_query("SELECT firmTitle, attendee FROM attendees") or die(mysql_error()); while ($row = mysql_fetch_array($sql)) { // Print labels $pdf->Add_PDF_Label(sprintf("%s\n%s\n", ucwords($row['attendee']), $row['firmTitle'])); } $pdf->Output(); Any advice? I know this is a tough one, but I am hoping someone may know. SC Link to comment https://forums.phpfreaks.com/topic/68770-pdf_lablephp-got-it-to-work-with-mysql-but-need-php-generated-css-is-the-pdf/ Share on other sites More sharing options...
suttercain Posted September 11, 2007 Author Share Posted September 11, 2007 Maybe now that more people are online...? Link to comment https://forums.phpfreaks.com/topic/68770-pdf_lablephp-got-it-to-work-with-mysql-but-need-php-generated-css-is-the-pdf/#findComment-346039 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.