Untitled

mail@pastecode.io avatar
unknown
plain_text
22 days ago
6.5 kB
0
Indexable
Never
from PyPDF2 import PdfReader, PdfWriter
from reportlab.lib.pagesizes import letter
from reportlab.pdfgen import canvas
from reportlab.lib.colors import Color, blue, green, red

# Define colors
header_color = blue
section_color = green
important_field_color = red

# Create a new PDF with ReportLab
output_pdf_path = "/mnt/data/Colorful_Tenant_Information.pdf"
c = canvas.Canvas(output_pdf_path, pagesize=letter)
width, height = letter

# Add content with colors
c.setFont("Helvetica-Bold", 14)
c.setFillColor(header_color)
c.drawString(200, height - 50, "TENANT INFORMATION")

# Personal Details
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 80, "Personal Details:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 100, "Name: ________________________   Social Security No.: ______________________")
c.drawString(30, height - 120, "Address: ______________________   Telephone No.: _____________________")
c.drawString(30, height - 140, "Yrs/Mo. @ Address: _______   You: __Own  __Rent   Age: ______   D.O.B.: __/__/__")

# Current Residence
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 170, "Current Residence:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 190, "Current Rent Payment: _______   Landlord Name: _______________________")
c.drawString(30, height - 210, "Landlord Address: _______________________________________________________")
c.drawString(30, height - 230, "Landlord Telephone No.: _______________________")

# Car Information
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 260, "Car Information:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 280, "Year/Make/Model of Car You Drive: ________________________   Color: ________________")

# Employment Details
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 310, "Employment Details:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 330, "Employer: ________________________   Occupation: _______________________")
c.drawString(30, height - 350, "Work Address: _______________________________________________________")
c.drawString(30, height - 370, "Work Telephone No.: _______________________")
c.drawString(30, height - 390, "Supervisor’s Name: ___________________   Years/Months Employed: ___________")

# Apartment and Pets
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 420, "Apartment and Pets:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 440, "Do you keep your apartment clean? __Yes   __No")
c.drawString(30, height - 460, "Pets: __Yes   __No   What kind of pet: _______________   Weight/Size: __________")

# Reason for Moving
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 490, "Reason for Moving:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 510, "Reason for Moving: _______________________________________________________")
c.drawString(30, height - 530, "Eviction: __Yes   __No")

# Marital Status
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 560, "Marital Status:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 580, "Marital Status: _______________   Yrs/Months Married: __________")
c.drawString(30, height - 600, "Spouse Name: ___________________   Age: ______   D.O.B.: __/__/__")
c.drawString(30, height - 620, "Social Security No.: ______________________")

# Employment Details (Spouse)
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 650, "Employment Details (Spouse):")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 670, "Employer: ________________________   Occupation: _______________________")
c.drawString(30, height - 690, "Work Address: _______________________________________________________")
c.drawString(30, height - 710, "Work Telephone No.: _______________________")
c.drawString(30, height - 730, "Supervisor’s Name: ___________________   Years/Months Employed: ___________")

# Residents
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 760, "Residents:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 780, "# of People That Will Reside on the Premises: _______")
c.drawString(30, height - 800, "Full Names and Relationships of People Who Will Reside on Premises:")
c.drawString(30, height - 820, "_______________________________________________________________")
c.drawString(30, height - 840, "_______________________________________________________________")
c.drawString(30, height - 860, "_______________________________________________________________")

# Closest Living Relative
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 890, "Closest Living Relative:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 910, "Closest Living Relative Name/Address/Phone/Relationship:")
c.drawString(30, height - 930, "_______________________________________________________________")

# References
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 960, "References:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 980, "References: Name/Address/Phone:")
c.drawString(30, height - 1000, "1) _______________________________________________________________")
c.drawString(30, height - 1020, "2) _______________________________________________________________")
c.drawString(30, height - 1040, "3) _______________________________________________________________")

# Signature
c.setFont("Helvetica-Bold", 12)
c.setFillColor(section_color)
c.drawString(30, height - 1070, "Signature:")

c.setFont("Helvetica", 10)
c.setFillColor(important_field_color)
c.drawString(30, height - 1090, "Signature: ________________________")

# Save the PDF
c.save()

output_pdf_path
Leave a Comment