Untitled
Anonymous
plain_text
03/03/2026 10:09 PM
2.5 KB
15
Indexable
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import letter
from reportlab.lib import colors
file_path = "LSPD_Patrol_Guide_Bulletin_Fillable.pdf"
c = canvas.Canvas(file_path, pagesize=letter)
width, height = letter
# Header
c.setFont("Helvetica-Bold", 20)
c.drawCentredString(width / 2, height - 50, "LOS SANTOS POLICE DEPARTMENT")
c.setFont("Helvetica-Bold", 16)
c.drawCentredString(width / 2, height - 80, "PATROL GUIDE BULLETIN")
# Labels
c.setFont("Helvetica", 12)
c.drawString(50, height - 120, "Bulletin No:")
c.drawString(300, height - 120, "Issued By:")
c.drawString(50, height - 150, "Subject:")
c.drawString(50, height - 190, "Directive:")
c.drawString(50, height - 260, "1. Increased Vigilance:")
c.drawString(50, height - 340, "2. Patrol Operations:")
c.drawString(50, height - 420, "3. Radio Communication (Plain Language):")
c.drawString(50, height - 500, "4. Reporting Procedure:")
c.drawString(50, height - 580, "Effective Date:")
# Create fillable form
form = c.acroForm
form.textfield(name='bulletin_no', x=130, y=height - 135, width=150, height=20)
form.textfield(name='issued_by', x=370, y=height - 135, width=150, height=20)
form.textfield(name='subject', x=50, y=height - 170, width=500, height=20)
form.textfield(name='directive', x=50, y=height - 230, width=500, height=40, multiline=True)
form.textfield(name='vigilance', x=50, y=height - 300, width=500, height=40, multiline=True)
form.textfield(name='patrol_ops', x=50, y=height - 380, width=500, height=40, multiline=True)
form.textfield(name='radio_comm', x=50, y=height - 460, width=500, height=40, multiline=True)
form.textfield(name='reporting', x=50, y=height - 540, width=500, height=40, multiline=True)
form.textfield(name='effective_date', x=150, y=height - 595, width=200, height=20)
c.save()
print("Fillable LSPD Patrol Guide Bulletin PDF created successfully.")
Editor is loading...
Leave a Comment