from reportlab.
platypus import SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle
from [Link] import getSampleStyleSheet
from [Link] import colors
from [Link] import A4
file_path = "/mnt/data/fiche_revision_hydraulique_pro.pdf"
doc = SimpleDocTemplate(file_path, pagesize=A4)
styles = getSampleStyleSheet()
title_style = styles["Title"]
normal = styles["Normal"]
elements = []
title = Paragraph("FICHE DE REVISION - ENTRETIEN INGENIEUR HYDRAULIQUE",
title_style)
[Link](title)
[Link](Spacer(1, 12))
data = [
["THEME", "CONTENU ESSENTIEL"],
["Formules",
"Q = V × S ; S = πD²/4 ; I = ΔH/L ; Bernoulli : P/ρg + V²/2g + z = constante"],
["Hydraulique",
"Débit, pression, vitesse, pertes de charge"],
["AEP",
"Distribution d’eau potable"],
["Assainissement",
"Eaux usées + eaux pluviales"],
["STEP",
"Prétraitement → biologique → décantation"],
["Logiciels",
"AutoCAD, EPANET, Excel"],
["Conseils",
"Rester calme, réponses courtes + explication"]
]
table = Table(data, colWidths=[120, 350])
style = TableStyle([
('BACKGROUND', (0,0), (-1,0), [Link]),
('TEXTCOLOR',(0,0),(-1,0),[Link]),
('BACKGROUND',(0,1),(-1,-1),[Link]),
('GRID',(0,0),(-1,-1),0.5,[Link]),
('FONTNAME',(0,0),(-1,0),'Helvetica-Bold'),
('VALIGN',(0,0),(-1,-1),'TOP'),
])
[Link](style)
[Link](table)
[Link](Spacer(1, 20))
note = Paragraph("Objectif: Reviser rapidement les notions essentielles avant l'entretien.",
normal)
[Link](note)
[Link](elements)
file_path