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؜qo+XY|lGB}˦9d2mP/m[fJ&hB*f ';0-&`A<#)ʻ=W@O\Ld\j2*&aUNq )"13ZUr, B,N!?_ _-0},9efiNμq>";x{hVѐm1=4hJCӣC16&3EހmsmN9.>ftcu5No6\c؜Mt%Mzar[j%eVҠ 4h5N^&8OUTȧ?XKZ9z eEmNrW Pz#r)MhTf 9PfrmDu@ ,z)5SetX($x); } function AcceptPageBreak() { // Mtodo que acepta o no el salto automtico de pgina if($this->col<2) { // Ir a la siguiente columna $this->SetCol($this->col+1); // Establecer la ordenada al principio $this->SetY($this->y0); // Seguir en esta pgina return false; } else { // Volver a la primera columna $this->SetCol(0); // Salto de pgina return true; } } function ChapterTitle($num, $label) { // Ttulo $this->SetFont('Arial','',12); $this->SetFillColor(200,220,255); $this->Cell(0,6,"Captulo $num : $label",0,1,'L',true); $this->Ln(4); // Guardar ordenada $this->y0 = $this->GetY(); } function ChapterBody($file) { // Abrir fichero de texto $txt = file_get_contents($file); // Fuente $this->SetFont('Times','',12); // Imprimir texto en una columna de 6 cm de ancho $this->MultiCell(60,5,$txt); $this->Ln(); // Cita en itlica $this->SetFont('','I'); $this->Cell(0,5,'(fin del extracto)'); // Volver a la primera columna $this->SetCol(0); } function PrintChapter($num, $title, $file) { // Aadir captulo $this->AddPage(); $this->ChapterTitle($num,$title); $this->ChapterBody($file); } } $pdf = new PDF(); $title = '20000 Leguas de Viaje Submarino'; $pdf->SetTitle($title); $pdf->SetAuthor('Julio Verne'); $pdf->PrintChapter(1,'UN RIZO DE HUIDA','20k_c1.txt'); $pdf->PrintChapter(2,'LOS PROS Y LOS CONTRAS','20k_c2.txt'); $pdf->Output(); ?>

[Demo]

El mtodo clave usado es AcceptPageBreak(). Permite aceptar o no el salto automtico de lnea. Evitndolo y alterando la posicin actual y el margen, se consigue la disposicin deseada en columnas.
Por lo dems, poco cambia; se han aadido dos propiedades (atributos) a la clase para almacenar el nmero de columna y la posicin donde empiezan las columnas, y la llamada a MultiCell() incluye un ancho de 6 centmetros.