I'm currently working on a Django project in which the client needs to print reports where remaining spaces are filled up with dots up to the end of the line dynamically. I'm using the PyFpdf2 library for PDF reports. The outputs should look like this: This is line 1.................... This is line 2....................
I am using basic cells and multicells as:
pdf = FPDF()
pdf.add_page()
pdf.set_font('Arial', '', 12)
pdf.cell(40, 8, 'This is line 1........')
Anyone can help?
Oh, I got the answer I needed. The python string methods
ljust
,center
andrjust
are just what I needed! For instanceThe outputs fills up the remaining spaces with dots like
John..........