|
@@ -546,9 +546,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|
|
$this->pdfTabTitles($pdf, $tab_top, $tab_height, $outputlangs, $hidetop);
|
|
|
$pdf->rollbackTransaction(true);
|
|
|
|
|
|
- $iniY = $tab_top + $this->tabTitleHeight + 2;
|
|
|
- $curY = $tab_top + $this->tabTitleHeight + 2;
|
|
|
- $nexY = $tab_top + $this->tabTitleHeight + 2;
|
|
|
+ $nexY = $tab_top + $this->tabTitleHeight;
|
|
|
|
|
|
// Loop on each lines
|
|
|
$pageposbeforeprintlines = $pdf->getPage();
|
|
@@ -567,12 +565,9 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|
|
$pdf->setPageOrientation('', 1, $heightforfooter + $heightforfreetext + $heightforinfotot); // The only function to edit the bottom margin of current page to set it.
|
|
|
$pageposbefore = $pdf->getPage();
|
|
|
|
|
|
- // Description of product line
|
|
|
- $curX = $this->posxdesc - 1;
|
|
|
|
|
|
$showpricebeforepagebreak = 1;
|
|
|
$posYAfterImage = 0;
|
|
|
- $posYAfterDescription = 0;
|
|
|
|
|
|
if ($this->getColumnStatus('photo'))
|
|
|
{
|
|
@@ -603,19 +598,8 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|
|
if ($this->getColumnStatus('desc'))
|
|
|
{
|
|
|
$pdf->startTransaction();
|
|
|
- pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
|
|
- $posYAfterDescription = $pdf->GetY();
|
|
|
-
|
|
|
- // Display extrafield if needed
|
|
|
- $params = array(
|
|
|
- 'display' => 'list',
|
|
|
- 'printableEnable' => array(3),
|
|
|
- 'printableEnableNotEmpty' => array(4)
|
|
|
- );
|
|
|
- $extrafieldDesc = $this->getExtrafieldsInHtml($object->lines[$i], $outputlangs, $params);
|
|
|
- if(!empty($extrafieldDesc)){
|
|
|
- $this->printStdColumnContent($pdf, $posYAfterDescription, 'desc', $extrafieldDesc);
|
|
|
- }
|
|
|
+
|
|
|
+ $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
|
|
|
|
|
$pageposafter = $pdf->getPage();
|
|
|
if ($pageposafter > $pageposbefore) // There is a pagebreak
|
|
@@ -624,7 +608,8 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|
|
$pageposafter = $pageposbefore;
|
|
|
//print $pageposafter.'-'.$pageposbefore;exit;
|
|
|
$pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it.
|
|
|
- pdf_writelinedesc($pdf, $object, $i, $outputlangs, $this->getColumnContentWidth('desc'), 3, $this->getColumnContentXStart('desc'), $curY, $hideref, $hidedesc);
|
|
|
+
|
|
|
+ $this->printColDescContent($pdf, $curY, 'desc', $object, $i, $outputlangs, $hideref, $hidedesc);
|
|
|
$pageposafter = $pdf->getPage();
|
|
|
$posyafter = $pdf->GetY();
|
|
|
if ($posyafter > ($this->page_hauteur - ($heightforfooter + $heightforfreetext + $heightforinfotot))) // There is no space left for total+free text
|
|
@@ -651,7 +636,6 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|
|
{
|
|
|
$pdf->commitTransaction();
|
|
|
}
|
|
|
- $posYAfterDescription = $pdf->GetY();
|
|
|
}
|
|
|
|
|
|
|
|
@@ -788,11 +772,10 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|
|
$pdf->setPage($pageposafter);
|
|
|
$pdf->SetLineStyle(array('dash'=>'1,1', 'color'=>array(80, 80, 80)));
|
|
|
//$pdf->SetDrawColor(190,190,200);
|
|
|
- $pdf->line($this->marge_gauche, $nexY + 1, $this->page_largeur - $this->marge_droite, $nexY + 1);
|
|
|
+ $pdf->line($this->marge_gauche, $nexY, $this->page_largeur - $this->marge_droite, $nexY);
|
|
|
$pdf->SetLineStyle(array('dash'=>0));
|
|
|
}
|
|
|
|
|
|
- $nexY += 2; // Add space between lines
|
|
|
|
|
|
// Detect if some page were added automatically and output _tableau for past pages
|
|
|
while ($pagenb < $pageposafter)
|
|
@@ -1704,7 +1687,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|
|
// Default field style for content
|
|
|
$this->defaultContentsFieldsStyle = array(
|
|
|
'align' => 'R', // R,C,L
|
|
|
- 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
|
|
+ 'padding' => array(1, 0.5, 1, 0.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
|
|
);
|
|
|
|
|
|
// Default field style for content
|
|
@@ -1741,10 +1724,11 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|
|
'align' => 'L',
|
|
|
// 'textkey' => 'yourLangKey', // if there is no label, yourLangKey will be translated to replace label
|
|
|
// 'label' => ' ', // the final label
|
|
|
- 'padding' => array(0.5, 1, 0.5, 1), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
|
|
+ 'padding' => array(0.5, 1, 0.5, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
|
|
),
|
|
|
'content' => array(
|
|
|
'align' => 'L',
|
|
|
+ 'padding' => array(1, 0.5, 1, 1.5), // Like css 0 => top , 1 => right, 2 => bottom, 3 => left
|
|
|
),
|
|
|
);
|
|
|
|