$pdf->selectFont($mainFont); $pdf->ezNewPage(); $pdf->ezStartPageNumbers(560, 25, 10, '', '', 1); $size = 10; $height = $pdf->getFontHeight($size); $textOptions = array('justification' => 'left'); $collecting = 0; $code = ''; $counter = 0; //used to count 8 to a page if (!isset($_GET['group'])) { $_GET['group'] = ''; } $list = new GroupContactList(StringHelper::cleanGPC($_GET['group'])); $conts = $list->getContacts(); foreach ($conts as $c) { $pdf->renderAddress($CONFIG_PDFBOOK_LINE_HEIGHT, $CONFIG_PDFBOOK_FONT_SIZE, createLinesFromContact($c), new ContactImage($c)); } $pdf->ezStopPageNumbers(1, 1); // Debug section............................................................................................... // adding ?d=1 to the url calling this will cause the pdf code itself to ve echoed to the // browser, this is quite useful for debugging purposes. if (!empty($_GET['d'])) { $pdfcode = $pdf->ezOutput(1); $pdfcode = str_replace("\n", "\n<br>", htmlspecialchars($pdfcode)); echo '<html><body>'; echo trim($pdfcode); echo '</body></html>'; } else { $pdf->ezStream(); }
$pdf->selectFont($mainFont); $pdf->ezSetDy(-100); // modified to use the local file if it can $pdf->openHere('Fit'); // we use a monospace font for printing labels $pdf->selectFont($codeFont); $size = 10; $height = $pdf->getFontHeight($size); $textOptions = array('justification' => 'left'); $collecting = 0; $code = ''; if (!isset($_GET['group'])) { $_GET['group'] = ''; } $list = new GroupContactList(StringHelper::cleanGPC($_GET['group'])); $conts = $list->getContacts(); foreach ($conts as $c) { $pdf->renderAddress(10, 10, createLinesFromContact($c)); } // Debug section // adding ?d=1 to the url calling this will cause the pdf code itself to ve echoed to the // browser, this is quite useful for debugging purposes. if (!empty($_GET['d'])) { $pdfcode = $pdf->ezOutput(1); $pdfcode = str_replace("\n", "\n<br>", htmlspecialchars($pdfcode)); echo '<html><body>'; echo trim($pdfcode); echo '</body></html>'; } else { $pdf->ezStream(); }