Untitled

 avatar
unknown
plain_text
20 days ago
599 B
2
Indexable
# Ensuring all special characters are replaced with standard ASCII equivalents
resume_content_fixed = resume_content_fixed.replace("–", "-")  # Replace en dash

# Create a new PDF instance
pdf = FPDF()
pdf.set_auto_page_break(auto=True, margin=15)
pdf.add_page()
pdf.set_font("Arial", style="", size=12)

# Add content to PDF
for line in resume_content_fixed.split("\n"):
    pdf.cell(0, 7, line.encode('latin-1', 'ignore').decode('latin-1'), ln=True)

# Save PDF
pdf_filename = "/mnt/data/Denis_Mehmedi_Resume.pdf"
pdf.output(pdf_filename)

# Provide the PDF file path for download
pdf_filename

Editor is loading...
Leave a Comment