Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -281,6 +281,7 @@ def create_pdf(images, description, email, company):
|
|
281 |
c.drawString(50, y_position, line)
|
282 |
y_position -= 15 # Adjust for line spacing
|
283 |
|
|
|
284 |
for image in images:
|
285 |
print(image)
|
286 |
y_position -= 300 # Adjust this based on your image sizes
|
@@ -290,9 +291,11 @@ def create_pdf(images, description, email, company):
|
|
290 |
|
291 |
buffered = io.BytesIO()
|
292 |
|
293 |
-
pil_image = Image.open(image[
|
294 |
pil_image.save(buffered, format='JPEG')
|
295 |
-
c.drawImage(ImageReader(buffered), 50,
|
|
|
|
|
296 |
|
297 |
|
298 |
c.save()
|
|
|
281 |
c.drawString(50, y_position, line)
|
282 |
y_position -= 15 # Adjust for line spacing
|
283 |
|
284 |
+
image_position = y_position
|
285 |
for image in images:
|
286 |
print(image)
|
287 |
y_position -= 300 # Adjust this based on your image sizes
|
|
|
291 |
|
292 |
buffered = io.BytesIO()
|
293 |
|
294 |
+
pil_image = Image.open(image[0])
|
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()
|