from fpdf import FPDF
# Create a PDF class
class PDF(FPDF):
def header(self):
self.set_font("Arial", "B", 12)
self.cell(0, 10, "", ln=True)
def footer(self):
self.set_y(-15)
self.set_font("Arial", "I", 8)
self.cell(0, 10, f"Page {self.page_no()}", 0, 0, "C")
# Create the cover letter PDF
pdf = PDF()
pdf.add_page()
pdf.set_auto_page_break(auto=True, margin=15)
pdf.set_font("Arial", size=12)
text = """Mohamed Ebrahim El-Said
Zagazig, Egypt
+20 112 686 3737
[email protected]
May 24, 2025
Recruitment Team
Deloitte
Dear Hiring Team at Deloitte,
I am writing to express my interest in joining Deloitte. I recently graduated from Zagazig University with a degree in Accounting, where I achieved an Excellent academic standing and a GPA of 3.6.
During my time at university, I developed strong analytical and problem-solving skills through both coursework and practical projects. My academic performance reflects my commitment to excellence, and I am eager to bring that same level of dedication to your esteemed firm. Deloitte’s global reputation for innovation, professional growth, and integrity makes it an ideal environment for me to begin my professional journey.
I am particularly drawn to Deloitte’s collaborative culture and its focus on continuous development. I am confident that my educational background, combined with my enthusiasm for learning and growth, makes me a strong candidate for your team.
Thank you for considering my application. I would welcome the opportunity to discuss how my skills and ambitions align with Deloitte’s goals. Please find my CV attached for your review.
Sincerely,
Mohamed Ebrahim El-Said
"""
# Add the text to the PDF
for line in text.split("\n"):
pdf.multi_cell(0, 10, line)
# Output the PDF to a file
pdf_path = "/mnt/data/Mohamed_Ebrahim_El-Said_Cover_Letter_Deloitte.pdf"
pdf.output(pdf_path)
pdf_path