Hi all,
I am having problems with v1.3.
My product images are almost all the way off the right hand side of the page. Past the right hand extreme of the text descriptions etc.
I assume this is positioned in pdf_datasheet_functions.php
I have no idea how to set it though:
Here is my current code from line 208 to 324
function ShowImage(&$width,&$height,$path,$loc='',$x_pos=1) { $width=min($width,PDF_MAX_IMAGE_WIDTH); $height = (IMAGE_KEEP_PROPORTIONS != 0 ? $height : min($height,PDF_MAX_IMAGE_HEIGHT)); $this->SetLineWidth(1); $this->Cell($width,$height,"",0,0); $this->SetLineWidth(0.2); $pos=strrpos($path,'.'); $type=substr(strtolower($path),$pos+1); if($type=='jpg' or $type=='jpeg' or $type=='png' or $type=='gif'){ if ($loc==false){ $this->Image($path,($this->GetX()-$width)+1, $this->GetY(), $width, $height); }else{ $this->SetY(($this->GetY())+5); $this->Image($path,$x_pos +1, $this->GetY(), $width, $height); } }else{ $this->SetDrawColor(230,230,230); if($loc==false){ $this->x = $this->GetX()-$width; }else{ $this->x = $this->GetX(); } $this->SetTextColor(230,230,230); $this->Cell($width,$height,'No image',1,0,C); $this->SetTextColor(0); $this->SetDrawColor(0); } } function CalculatedSpace($y1,$y2,$imageheight) { //Si les commentaires sont - importants que l'image au niveau de l'espace d'affichage if(($h2=$y2-$y1) < $imageheight) { $this->Ln(($imageheight-$h2)+3); } else { $this->Ln(3); } } function DrawCells($data_array) { $totallines=0; for($i=2;$i<(sizeof($data_array)-1);$i++) { $totallines+=$this->NbLines((220-$data_array[0]),$data_array[$i]); } //5 = cells height $h=5*$totallines."<br>"; //if products description takes the whole page height goes to new page if($h<TEXT_HEIGHT) { $this->CheckPageBreak($h); } if(SHOW_IMAGES && strlen($data_array[10])) { //If custom image if(PDF_IMAGE_KEEP_PROPORTIONS != 0 ) { $heightwidth=getimagesize($data_array[10]); $factor = $heightwidth[0]/$heightwidth[1]; $data_array[0]=$imagewidth=PDF_MAX_IMAGE_WIDTH*PDF_TO_MM_FACTOR; // Bild in Orginalgr??e abbilden, maximale Gr??e ignorieren // $data_array[0]=$imagewidth=$heightwidth[1]*PDF_TO_MM_FACTOR; $data_array[1]=$data_array[0]/$factor; $this->ShowImage($data_array[0],$data_array[1],$data_array[10]); $y1=$this->GetY(); } //If Small Image Width and Small Image Height are defined else if(strlen($data_array[0])>1 && strlen($data_array[1])>1) { $this->ShowImage($data_array[0],$data_array[1],$data_array[10]); $y1=$this->GetY(); } //If only Small Image Width is defined else if(strlen($data_array[0])>1 && strlen($data_array[1])) { $heightwidth=getimagesize($data_array[10]); $data_array[0]=$data_array[0]; $data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR; $this->ShowImage($data_array[0],$data_array[1],$data_array[10]); $y1=$this->GetY(); } //If only Small Image Height is defined else if(strlen($data_array[0]) && strlen($data_array[1])>1) { $heightwidth=getimagesize($data_array[10]); $data_array[0]=$width=$heightwidth[0]*PDF_TO_MM_FACTOR; $data_array[1]=$data_array[1]; $this->ShowImage($data_array[0],$data_array[1],$data_array[10]); $y1=$this->GetY(); } else { $heightwidth=getimagesize($data_array[10]); $data_array[0]=$heightwidth[0]*PDF_TO_MM_FACTOR; $data_array[1]=$heightwidth[1]*PDF_TO_MM_FACTOR; $this->ShowImage($data_array[0],$data_array[1],$data_array[10]); $y1=$this->GetY(); } } else { $data_array[0]=$data_array[1]=0; $y1=$this->GetY(); }