Revert hack for for improve center paragraph in thml2pdf library. Don't run well

skala
Juan Carlos Raña 16 years ago
parent 87a306c19c
commit edaacb5256
  1. 13
      main/inc/lib/html2pdf/html2pdf.class.php

@ -2829,18 +2829,7 @@ if (!defined('__CLASS_HTML2PDF__'))
$this->style->setPosition($this->pdf->x, $this->pdf->y);
$this->style->FontSet();
if ($this->style->value['text-indent']>0) $this->pdf->x+= $this->style->value['text-indent'];
// Hack for improve center paragraph by Juan Carlos Raña
$parent_w = $this->pdf->w - $this->pdf->lMargin - $this->pdf->rMargin;
if ($parent_w>$w)
{
if ($this->style->value['text-align']=='center') $this->pdf->x = $this->pdf->x + ($parent_w-$w)*0.5;
}
$this->style->setPosition($this->pdf->x, $this->pdf->y);
//
if ($this->style->value['text-indent']>0) $this->pdf->x+= $this->style->value['text-indent'];
return true;
}

Loading…
Cancel
Save