Project

General

Profile

Task #1932

Text Align - Justify / Fpdf Advanced Multicell

Added by Ricardo NC about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Target version:
-
Start date:
04/07/2020
Due date:
% Done:

0%

Estimated time:

Description

Hello,

Currently, the alignment justify "J" isn't working well.

My code is:

$pdf = new Pdf();
$multicell = new Multicell($pdf);

$font = "helvetica";

// Set the styles for the advanced multicell
$multicell->setStyle("b", $font, "B", 10, "0,0,0");
$multicell->setStyle("h", $font, "B", 11, "0,0,0");
$multicell->setStyle("p", $font, "", 10, "0,0,0");

$pdf->AddPage();
$pdf->SetMargins(15, 15, 15);
$pdf->SetFont($font, '', 10);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetFillColor(205, 205, 205);

$pdf->Ln(1);

$multicell->multiCell(0, 10, "CONTRATO DE ARRENDAMENTO PARA FINS HABITACIONAIS COM PRAZO CERTO", 1, "C", 1);

$pdf->Ln(10);

$text = "Espazo Amarelo - Investimento Imobiliário, Unipessoal, Lda., com sede em Av. Infante Santo, n.º 100 A-C, 1350-179 Lisboa, freguesia de Lapa, concelho de Lisboa, NIPC 500111333, aqui representado(a) pelo(a) Manual Santis, na qualidade de Gerente da Sociedade aqui representada, com poderes para o ato, adiante designado(a) de Primeiro(a) Contraente ou Senhorio(a);";

$multicell->multiCell(0, 6, $text, 0, "J");

$pdf->Output();


Files

examples.zip examples.zip 2.32 KB Andrei Bintintan, 04/07/2020 09:34 PM
ex1.pdf View ex1.pdf 1.97 KB Andrei Bintintan, 04/07/2020 09:34 PM
ex1.php ex1.php 1.14 KB Andrei Bintintan, 04/07/2020 09:34 PM

Also available in: Atom PDF