*/
class GlmMembersFront_events_list extends GlmMembersFront_events_baseAction
{
- const PDF_TOP_Y = 750;
- const PDF_BOTTOM_Y = 60;
- const LINE_HEIGHT = 12;
+ const PDF_TOP_Y = 750;
+ const PDF_BOTTOM_Y = 60;
+ const LINE_HEIGHT = 12;
+ const PDF_LOGO_SCALE = 4;
+ const PDF_LOGO_X = 20;
+ const PDF_LOGO_Y = 760;
/**
* modelAction
*
$page = $pages->create(SetaPDF_Core_PageFormats::A4);
// add logo to top of the page
- $xObject->draw($page->getCanvas(), 20, 770, 500, 60);
+ $xObject->draw(
+ $page->getCanvas(),
+ self::PDF_LOGO_X,
+ self::PDF_LOGO_Y,
+ $xObject->getWidth() / self::PDF_LOGO_SCALE,
+ $xObject->getHeight() / self::PDF_LOGO_SCALE
+ );
$totalEvents = count($events);
$index = 0;
$pdfY -= self::LINE_HEIGHT * $lineCount + 10;
//echo '<pre>title $pdfY: ' . print_r($pdfY, true) . '</pre>';
+ if ( isset($event['categories']) && !empty($event['categories']) ) {
+ foreach ( $event['categories'] as $category ) {
+ // output the categories
+ }
+ }
+
if ( isset($event['intro']) && $event['intro'] ) {
// text
$intro = new SetaPDF_Core_Text_Block( $font, 8 );
$pdfY = self::PDF_TOP_Y;
$page = $pages->create(SetaPDF_Core_PageFormats::A4);
// add logo to top of the page
- $xObject->draw($page->getCanvas(), 20, 770, 500, 60);
+ $xObject->draw(
+ $page->getCanvas(),
+ self::PDF_LOGO_X,
+ self::PDF_LOGO_Y,
+ $xObject->getWidth() / self::PDF_LOGO_SCALE,
+ $xObject->getHeight() / self::PDF_LOGO_SCALE
+ );
}
}
$text = str_replace('–', '-', $text);
$text = str_replace(''', "'", $text);
$text = str_replace("\n", '', $text);
+ $text = str_replace("\r", '', $text);
return $text;
}
}