Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -284,10 +284,10 @@ def create_pdf(images, description, email, company):
|
|
| 284 |
image_position = y_position
|
| 285 |
for image in images:
|
| 286 |
print(image)
|
| 287 |
-
|
| 288 |
-
if
|
| 289 |
c.showPage()
|
| 290 |
-
|
| 291 |
|
| 292 |
buffered = io.BytesIO()
|
| 293 |
|
|
@@ -295,7 +295,6 @@ def create_pdf(images, description, email, company):
|
|
| 295 |
pil_image.save(buffered, format='JPEG')
|
| 296 |
c.drawImage(ImageReader(buffered), 50, image_position - 150, width=200, height=200)
|
| 297 |
|
| 298 |
-
image_position = image_position - 200
|
| 299 |
|
| 300 |
|
| 301 |
c.save()
|
|
|
|
| 284 |
image_position = y_position
|
| 285 |
for image in images:
|
| 286 |
print(image)
|
| 287 |
+
image_position -= 300 # Adjust this based on your image sizes
|
| 288 |
+
if image_position <= 150:
|
| 289 |
c.showPage()
|
| 290 |
+
image_position = height - 50
|
| 291 |
|
| 292 |
buffered = io.BytesIO()
|
| 293 |
|
|
|
|
| 295 |
pil_image.save(buffered, format='JPEG')
|
| 296 |
c.drawImage(ImageReader(buffered), 50, image_position - 150, width=200, height=200)
|
| 297 |
|
|
|
|
| 298 |
|
| 299 |
|
| 300 |
c.save()
|