|
|
@@ -132,9 +132,22 @@ $pdf->SetFont("Arial", "B", $normal_font_size);
|
|
|
$pdf->Cell(95, $cell_height, "Location Photo", 0, 1);
|
|
|
$pdf->SetFont("Arial");
|
|
|
|
|
|
-$location_photo = $test->getDirectory() . "/location_photo.jpg";
|
|
|
+$location_photo_path = $test->getDirectory() . "/location_photo.jpg";
|
|
|
|
|
|
-$pdf->Image($location_photo, $pdf->GetX(), $pdf->GetY(), 90);
|
|
|
+$size = getimagesize($location_photo_path);
|
|
|
+list($image_width, $image_height) = $size;
|
|
|
+
|
|
|
+$width = 0;
|
|
|
+$height = 0;
|
|
|
+if($image_height > $image_width) {
|
|
|
+ $height = 70;
|
|
|
+}
|
|
|
+else {
|
|
|
+ $width = 70;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+$pdf->Image($location_photo_path, $pdf->GetX(), $pdf->GetY(), $width, $height);
|
|
|
|
|
|
|
|
|
// Staff Details
|