Commit
•
0e84131
1
Parent(s):
0c05807
Update app.py
Browse files
app.py
CHANGED
@@ -348,7 +348,8 @@ def generate_certificate(certificate_model, first_name, last_name):
|
|
348 |
rgb = Image.new('RGB', im.size, (255, 255, 255)) # white background
|
349 |
rgb.paste(rgba, mask=rgba.split()[3]) # 3 is the alpha channel
|
350 |
pdf_ = rgb.save("certificate.pdf", 'PDF', save_all = True, resolution=100.0)
|
351 |
-
print
|
|
|
352 |
pdf = pdf_.filename
|
353 |
|
354 |
return im, pdf
|
|
|
348 |
rgb = Image.new('RGB', im.size, (255, 255, 255)) # white background
|
349 |
rgb.paste(rgba, mask=rgba.split()[3]) # 3 is the alpha channel
|
350 |
pdf_ = rgb.save("certificate.pdf", 'PDF', save_all = True, resolution=100.0)
|
351 |
+
print("RGB", rgb)
|
352 |
+
print("PDF", pdf_)
|
353 |
pdf = pdf_.filename
|
354 |
|
355 |
return im, pdf
|