Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -379,6 +379,36 @@ def build_pdf(case: dict, files: list, out_path: str):
|
|
| 379 |
c.drawImage(ImageReader(mimg), 11.0*cm, y-9.8*cm,
|
| 380 |
width=8.0*cm, height=9.0*cm,
|
| 381 |
preserveAspectRatio=True, mask='auto')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 382 |
|
| 383 |
yb = y - 10.4*cm
|
| 384 |
rev = reverse_geocode(lat, lng)
|
|
|
|
| 379 |
c.drawImage(ImageReader(mimg), 11.0*cm, y-9.8*cm,
|
| 380 |
width=8.0*cm, height=9.0*cm,
|
| 381 |
preserveAspectRatio=True, mask='auto')
|
| 382 |
+
# ✅ INTEGRITY VERIFICATION DASHBOARD - BELOW IMAGES
|
| 383 |
+
try:
|
| 384 |
+
integrity_image_path = "integrity_dashboard.png"
|
| 385 |
+
if os.path.exists(integrity_image_path):
|
| 386 |
+
# Position below the image and map
|
| 387 |
+
integrity_y = y - 7.8*cm
|
| 388 |
+
|
| 389 |
+
# Section title
|
| 390 |
+
c.setFont("Helvetica-Bold", 12)
|
| 391 |
+
c.drawString(MARGIN, integrity_y, "Data Integrity Verification")
|
| 392 |
+
integrity_y -= 0.4*cm
|
| 393 |
+
|
| 394 |
+
# Display the image
|
| 395 |
+
c.drawImage(
|
| 396 |
+
integrity_image_path,
|
| 397 |
+
MARGIN,
|
| 398 |
+
integrity_y - 2.5*cm,
|
| 399 |
+
width=15*cm,
|
| 400 |
+
height=2.2*cm,
|
| 401 |
+
preserveAspectRatio=True,
|
| 402 |
+
mask='auto'
|
| 403 |
+
)
|
| 404 |
+
|
| 405 |
+
# Start metadata below the integrity image
|
| 406 |
+
yb = integrity_y - 3.0*cm
|
| 407 |
+
else:
|
| 408 |
+
yb = y - 7.8*cm
|
| 409 |
+
except Exception as e:
|
| 410 |
+
print(f"Warning: Could not load integrity image: {e}")
|
| 411 |
+
yb = y - 7.8*cm
|
| 412 |
|
| 413 |
yb = y - 10.4*cm
|
| 414 |
rev = reverse_geocode(lat, lng)
|