Spaces:
Sleeping
Sleeping
Delete utils.py
Browse files
utils.py
DELETED
|
@@ -1,15 +0,0 @@
|
|
| 1 |
-
from fpdf import FPDF
|
| 2 |
-
import io
|
| 3 |
-
|
| 4 |
-
def create_pdf(captions: list):
|
| 5 |
-
pdf = FPDF()
|
| 6 |
-
pdf.add_page()
|
| 7 |
-
pdf.set_font("Arial", size=12)
|
| 8 |
-
|
| 9 |
-
for i, text in enumerate(captions):
|
| 10 |
-
pdf.multi_cell(0, 10, f"{text}\n")
|
| 11 |
-
|
| 12 |
-
buffer = io.BytesIO()
|
| 13 |
-
pdf.output(buffer)
|
| 14 |
-
buffer.seek(0)
|
| 15 |
-
return buffer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|