from fpdf import FPDF
import os
# Define a PDF class
class ResumePDF(FPDF):
def header(self):
self.set_font("Arial", "B", 16)
self.set_text_color(30, 30, 30)
self.cell(0, 10, "Dhaval Vala", ln=True, align="C")
self.set_font("Arial", "", 12)
self.set_text_color(100, 100, 100)
self.cell(0, 10, "Application Developer", ln=True, align="C")
self.ln(5)
def section_title(self, title):
self.set_font("Arial", "B", 14)
self.set_text_color(50, 50, 100)
self.cell(0, 10, title, ln=True)
self.set_text_color(0, 0, 0)
def section_body(self, body):
self.set_font("Arial", "", 12)
self.multi_cell(0, 10, body)
self.ln()
def add_table(self, data, col_widths):
self.set_font("Arial", "B", 12)
for i, col in enumerate(data[0]):
self.cell(col_widths[i], 10, col, border=1, align='C')
self.ln()
self.set_font("Arial", "", 12)
for row in data[1:]:
for i, col in enumerate(row):
self.cell(col_widths[i], 10, col, border=1)
self.ln()
# Create PDF
pdf = ResumePDF()
pdf.add_page()
# Contact Info
pdf.section_title("Contact Information")
pdf.section_body("Address: Surat, Gujarat\nPhone: 74340 84913\nEmail: [email protected]")
# Objective
pdf.section_title("Career Objective")
pdf.section_body("Motivated and detail-oriented Application Developer with a passion for creating seamless user experiences and scalable backend solutions. Seeking to con
# Education
pdf.section_title("Education")
education = [
["Degree", "Institute", "Board/University", "Year", "Result"],
["BCA", "Your College Name", "University Name", "2024 - Present", "Running"],
["HSC", "Shree Bhavganga Highsecondary School", "GSEB", "2021 – 2023", "Completed"]
]
pdf.add_table(education, [35, 50, 45, 30, 30])
# Semester Details
pdf.section_title("BCA Semester Details")
semesters = [
["Semester", "Subjects Studied", "Status"],
["Semester 1", "Fundamentals of IT, Office Automation, Mathematics I, Communication Skills", "Completed"],
["Semester 2", "Programming in C, Operating Systems, Mathematics II, Digital Logic", "Completed"],
["Semester 3", "Data Structures, DBMS, Web Development, OOP", "Ongoing"],
["Semester 4", "Java Programming, Computer Networks, Software Engineering", "Upcoming"],
["Semester 5", "Android Development, Python Programming, Data Science Basics", "Upcoming"],
["Semester 6", "Project Work, Advanced Web/App Development, Internship", "Upcoming"]
]
pdf.add_table(semesters, [30, 120, 40])
# Technical Skills
pdf.section_title("Technical Skills")
pdf.section_body("• Java\n• Android Development\n• Kotlin\n• XML")
# Strengths
pdf.section_title("Strengths")
pdf.section_body("• Team Leadership\n• Responsible\n• Problem Solving\n• Positive Attitude")
# Internship
pdf.section_title("Internship Experience")
pdf.section_body("Position: Application Developer Intern\nDuration: [Specify Duration]\nTasks: Developed Android applications, collaborated with teams to fix bugs and imp
# Languages
pdf.section_title("Languages Known")
pdf.section_body("English, Hindi, Gujarati")
# References
pdf.section_title("References")
pdf.section_body("Available upon request.")
# Save PDF
output_path = "/mnt/data/Dhaval_Vala_Professional_Resume.pdf"
pdf.output(output_path)
output_path