Apr-11-2019, 09:56 PM
(This post was last modified: Apr-11-2019, 10:15 PM by Pedroski55.)
Thank you very much! I can use that!
Question: where should I put text2pdf.py? I mean, so that when I run the python script in bash, bash will find text2pdf.py?
I think I expressed myself badly. I will read each row of each excel file as a string, then write the strings of 1 excel file to 1 pdf, so that 1 pdf contains the data of 1 excel file.
Also, I was advised to use fpdf. I have not tried this yet, ran out of time yesterday.
Question: where should I put text2pdf.py? I mean, so that when I run the python script in bash, bash will find text2pdf.py?
I think I expressed myself badly. I will read each row of each excel file as a string, then write the strings of 1 excel file to 1 pdf, so that 1 pdf contains the data of 1 excel file.
Also, I was advised to use fpdf. I have not tried this yet, ran out of time yesterday.
# https://pyfpdf.readthedocs.io/en/latest/ import fpdf #pip3 install fpdf pdf = fpdf.FPDF(format='letter') #pdf format pdf.add_page() #create new page pdf.set_font("Arial", size=12) # font and textsize pdf.cell(200, 10, txt="your text", ln=1, align="L") pdf.cell(200, 10, txt="your text", ln=2, align="L") pdf.cell(200, 10, txt="your text", ln=3, align="L") pdf.output("test.pdf")