Jump to content

PDF_Lable.php got it to work with MySQL, but need PHP Generated CSS is the pdf


suttercain

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.