Add option MAIN_GENERATE_DOCUMENT_WITH_PICTURE
This commit is contained in:
parent
6a1446f4dd
commit
001072d34c
@ -285,26 +285,12 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
$dir = $conf->product->dir_output.'/'.$pdir;
|
$dir = $conf->product->dir_output.'/'.$pdir;
|
||||||
|
|
||||||
$realpath='';
|
$realpath='';
|
||||||
if ($object->ref == 'SPECIMEN' && $i == 1)
|
foreach ($objphoto->liste_photos($dir,1) as $key => $obj)
|
||||||
{
|
{
|
||||||
$realpath = DOL_DOCUMENT_ROOT.'/theme/common/nophoto.jpg';
|
$filename=$obj['photo'];
|
||||||
}
|
//if ($obj['photo_vignette']) $filename='thumbs/'.$obj['photo_vignette'];
|
||||||
else
|
$realpath = $dir.$filename;
|
||||||
{
|
break;
|
||||||
foreach ($objphoto->liste_photos($dir,1) as $key => $obj)
|
|
||||||
{
|
|
||||||
if ($obj['photo_vignette'])
|
|
||||||
{
|
|
||||||
$filename='thumbs/'.$obj['photo_vignette'];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$filename=$obj['photo'];
|
|
||||||
}
|
|
||||||
|
|
||||||
$realpath = $dir.$filename;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($realpath)) $imglinesize=pdf_getSizeForImage($realpath);
|
if (!empty($realpath)) $imglinesize=pdf_getSizeForImage($realpath);
|
||||||
@ -334,7 +320,7 @@ class pdf_azur extends ModelePDFPropales
|
|||||||
if (isset($imglinesize['width']) && isset($imglinesize['height']))
|
if (isset($imglinesize['width']) && isset($imglinesize['height']))
|
||||||
{
|
{
|
||||||
$curX = $this->posxpicture-1;
|
$curX = $this->posxpicture-1;
|
||||||
$pdf->Image($realpath, $curX + (($this->posxtva-$this->posxpicture-$imglinesize['width'])/2), $curY, $imglinesize['width'], $imglinesize['height'],'','','',2, 300); // Use 300 dpi
|
$pdf->Image($realpath, $curX + (($this->posxtva-$this->posxpicture-$imglinesize['width'])/2), $curY, $imglinesize['width'], $imglinesize['height'], '', '', '', 2, 300); // Use 300 dpi
|
||||||
// $pdf->Image does not increase value return by getY, so we save it manually
|
// $pdf->Image does not increase value return by getY, so we save it manually
|
||||||
$posYAfterImage=$curY+$imglinesize['height'];
|
$posYAfterImage=$curY+$imglinesize['height'];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user