mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-12 10:52:37 +01:00
Image top margin
This commit is contained in:
@@ -579,7 +579,8 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
|
||||
if ($this->getColumnStatus('photo')) {
|
||||
// We start with Photo of product line
|
||||
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imglinesize['height']) > ($this->page_hauteur - $heightforfooter)) { // If photo too high, we moved completely on new page
|
||||
$imageTopMargin = 1;
|
||||
if (isset($imglinesize['width']) && isset($imglinesize['height']) && ($curY + $imageTopMargin + $imglinesize['height']) > ($this->page_hauteur - $heightforfooter)) { // If photo too high, we moved completely on new page
|
||||
$pdf->AddPage('', '', true);
|
||||
if (!empty($tplidx)) {
|
||||
$pdf->useTemplate($tplidx);
|
||||
@@ -594,7 +595,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
||||
//$pdf->setPageOrientation('', 0, $heightforfooter + $heightforfreetext); // The only function to edit the bottom margin of current page to set it.
|
||||
|
||||
if (!empty($this->cols['photo']) && isset($imglinesize['width']) && isset($imglinesize['height'])) {
|
||||
$pdf->Image($realpatharray[$i], $this->getColumnContentXStart('photo'), $curY + 1, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi
|
||||
$pdf->Image($realpatharray[$i], $this->getColumnContentXStart('photo'), $curY + $imageTopMargin, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi
|
||||
// $pdf->Image does not increase value return by getY, so we save it manually
|
||||
$posYAfterImage = $curY + $imglinesize['height'];
|
||||
$this->setAfterColsLinePositionsData('photo', $posYAfterImage, $pdf->getPage());
|
||||
|
||||
Reference in New Issue
Block a user