Ejemplo n.º 1
0
 public function renderText(\TextContent $content)
 {
     switch ($content->getStyle()) {
         case 'title':
             $this->pdf->Ln(5);
             $this->pdf->SetFont('Helvetica', 'B');
             $this->pdf->SetFontSize(16);
             $this->pdf->Cell(0, 0, $content->getText());
             $this->pdf->Ln(5);
             break;
         case 'heading':
             $this->pdf->Ln(8);
             $this->pdf->SetFont('Helvetica', 'B');
             $this->pdf->SetFontSize(12);
             $this->pdf->Cell(0, 0, $content->getText());
             $this->pdf->Ln(3);
             break;
         default:
             $this->pdf->SetFont('Helvetica');
             $this->pdf->SetFontSize(12);
             $this->pdf->Cell(0, 0, $content->getText());
             $this->pdf->Ln(12 * 0.353);
             break;
     }
 }
Ejemplo n.º 2
0
 public function renderText(TextContent $content)
 {
     $this->markup .= "<div class='rapi-text rapi-text-{$content->getStyle()}'>{$content->getText()}</div>";
 }
Ejemplo n.º 3
0
 public function renderText(TextContent $content)
 {
     switch ($content->getStyle()) {
         case 'title':
             $this->worksheet->setCellValueByColumnAndRow(0, $this->row, $content->getText());
             $this->worksheet->getStyleByColumnAndRow(0, $this->row)->getFont()->setBold(true)->setSize(16)->setName('Helvetica');
             $this->worksheet->getRowDimension($this->row)->setRowHeight(36);
             break;
         case 'heading':
             $this->row++;
             $this->worksheet->setCellValueByColumnAndRow(0, $this->row, $content->getText());
             $this->worksheet->getStyleByColumnAndRow(0, $this->row)->getFont()->setBold(true)->setSize(12)->setName('Helvetica');
             $this->worksheet->getRowDimension($this->row)->setRowHeight(26);
     }
     $this->row++;
 }