Membuat File PDF di Python
Create a PDF file in Python
pip install fpdf
from fpdf import FPDF
/ icedina
x /clcoding
pdf = FPDF()
pdf.add_page()
pdf.set_font("Arial", size=12)
pdf.set_font("Arial", style="B", size=16)
pdf.cell(200, 10, txt="My First PDF in Python",
In=True, align="C")
Burpoououiid/
pdf.set_font("Arial", size=12)
pdf.multi_cell(0, 10, txt="This is created using Python")
pdf.output("clcoding.pdf")
print("PDF created successfully!")
/Pythonclcoding
#source code --> clcoding.com
PDF created successfully!

Posting Komentar untuk "Membuat File PDF di Python"