We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 10e474a + c35f035 commit 12ee998Copy full SHA for 12ee998
Image Text to PDF/script.py
@@ -3,6 +3,7 @@
3
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image
4
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
5
from reportlab.lib.units import inch
6
+import os
7
8
context=[]
9
img="img.jpg"
@@ -29,3 +30,10 @@
29
30
context.append(Paragraph(line, styles["Normal"]))
31
32
doc.build(context)
33
+
34
+pdf_filename = doc.filename
35
+pdf_filepath = os.path.dirname(os.path.abspath(pdf_filename))
36
37
+print("PDF succesfully created!")
38
+print("-File name: ", os.path.basename(pdf_filename))
39
+print("-PDF Location: ", pdf_filepath + "\\" + pdf_filename)
0 commit comments