I'm a 4th year MBBS student Create a A4 size presentation of 5 pages on the topic with pictures from the web, align every line perfectly i want everything in bullet points 20 lines in each page ,I want to take print so make it as a perfect a4 size pdf . I want every line in bullet point with perfect alignment and also change the colour and design make it better "Atypical forms of cardiomyopathy in children and adolescents."
atypical cardiomyopathy children adolescents LVNC ARVC Takotsubo restrictive pediatric
cardiomyopathy types children echocardiography pediatric
ARVC arrhythmogenic right ventricular cardiomyopathy ECG MRI
LVNC left ventricular non-compaction echocardiography trabeculations
Takotsubo stress cardiomyopathy apical ballooning left ventricle
mkdir -p /home/daytona/workspace/cardiomyopathy-presentation && ls /home/daytona/workspace/
~/cardiomyopathy-presentation/build_pdf.py
#!/usr/bin/env python3
"""
A4 Medical Presentation PDF - Atypical Cardiomyopathy in Children & Adolescents
5 pages, bullet points, professional design, print-ready
"""
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import mm, cm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Image, Table, TableStyle,
HRFlowable, KeepTogether
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_JUSTIFY
from reportlab.platypus import PageBreak
from reportlab.pdfgen import canvas
from reportlab.lib.colors import HexColor
import urllib.request
import os
import io
# ─── Color Palette ────────────────────────────────────────────────────────────
DARK_BLUE = HexColor('#0A1F44') # deep navy – headers
MID_BLUE = HexColor('#1565C0') # royal blue – section titles
ACCENT_TEAL = HexColor('#00838F') # teal – bullets & lines
LIGHT_BG = HexColor('#E8F4FD') # pale blue – shaded areas
GOLD = HexColor('#F9A825') # amber gold – title accent
WHITE = colors.white
BODY_GRAY = HexColor('#263238') # near-black for body text
SUBTITLE_GRAY = HexColor('#546E7A') # medium gray
# ─── Image URLs ───────────────────────────────────────────────────────────────
IMAGES = {
"lvnc_echo": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_9cc1dc1cb6806326493d268b7ba2cd1d2f9f4dc5c978ec839cf585560ccd6bac.jpg",
"arvc_ecg": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_d65acbdb065967303a2a2b15238a47ac1ab3eb9106c3c61e87a6faacf2eac1b8.jpg",
"takotsubo": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_c6021993840345b8856726d8526734bbd273e014a562a1a7c11bf144d093da75.jpg",
"dcm_echo": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_1343726ab8fc4a3d259fe96fd6a8a3563e064696a1f877344e881cd2003639d4.jpg",
"misc_echo": "https://cdn.orris.care/cdss_images/pmc_clinical_VQA_b31b63494cfe3a63e45550619118e82233ddf6b95faa092e15c84c95fbb99c4e.jpg",
}
IMG_DIR = "/home/daytona/workspace/cardiomyopathy-presentation/images"
os.makedirs(IMG_DIR, exist_ok=True)
def download_image(name, url):
path = f"{IMG_DIR}/{name}.jpg"
if not os.path.exists(path):
try:
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
with urllib.request.urlopen(req, timeout=15) as r:
data = r.read()
with open(path, 'wb') as f:
f.write(data)
print(f" ✓ {name}")
except Exception as e:
print(f" ✗ {name}: {e}")
return None
return path
print("Downloading images...")
img_paths = {k: download_image(k, v) for k, v in IMAGES.items()}
# ─── Page Canvas Decorator ────────────────────────────────────────────────────
PAGE_W, PAGE_H = A4 # 595.28 x 841.89 pt
def page_template(canvas_obj, doc):
"""Draw header band, footer, and page number on every page."""
canvas_obj.saveState()
# Top gradient band (simulated with two rectangles)
canvas_obj.setFillColor(DARK_BLUE)
canvas_obj.rect(0, PAGE_H - 58, PAGE_W, 58, fill=1, stroke=0)
canvas_obj.setFillColor(MID_BLUE)
canvas_obj.rect(0, PAGE_H - 62, PAGE_W, 8, fill=1, stroke=0)
# Header text
canvas_obj.setFillColor(WHITE)
canvas_obj.setFont("Helvetica-Bold", 10)
canvas_obj.drawString(22, PAGE_H - 26, "ATYPICAL CARDIOMYOPATHY IN CHILDREN & ADOLESCENTS")
canvas_obj.setFont("Helvetica", 8)
canvas_obj.setFillColor(GOLD)
canvas_obj.drawRightString(PAGE_W - 22, PAGE_H - 26, "4th Year MBBS | Pediatric Cardiology")
canvas_obj.setFillColor(WHITE)
canvas_obj.drawString(22, PAGE_H - 44, "A Comprehensive Clinical Overview")
# Gold accent stripe
canvas_obj.setFillColor(GOLD)
canvas_obj.rect(0, PAGE_H - 66, PAGE_W, 4, fill=1, stroke=0)
# Bottom footer band
canvas_obj.setFillColor(DARK_BLUE)
canvas_obj.rect(0, 0, PAGE_W, 30, fill=1, stroke=0)
canvas_obj.setFillColor(GOLD)
canvas_obj.rect(0, 30, PAGE_W, 3, fill=1, stroke=0)
# Page number
canvas_obj.setFillColor(WHITE)
canvas_obj.setFont("Helvetica", 8)
canvas_obj.drawCentredString(PAGE_W / 2, 11, f"Page {doc.page} | Pediatric Cardiology Reference Guide")
canvas_obj.restoreState()
# ─── Styles ───────────────────────────────────────────────────────────────────
styles = getSampleStyleSheet()
TITLE_STYLE = ParagraphStyle(
'PageTitle',
fontName='Helvetica-Bold',
fontSize=16,
textColor=DARK_BLUE,
spaceAfter=4,
leading=20,
)
SUBTITLE_STYLE = ParagraphStyle(
'PageSubtitle',
fontName='Helvetica-BoldOblique',
fontSize=11,
textColor=ACCENT_TEAL,
spaceAfter=6,
leading=14,
)
SECTION_STYLE = ParagraphStyle(
'Section',
fontName='Helvetica-Bold',
fontSize=10.5,
textColor=MID_BLUE,
spaceBefore=5,
spaceAfter=2,
leading=13,
borderPad=2,
)
BULLET_STYLE = ParagraphStyle(
'Bullet',
fontName='Helvetica',
fontSize=9,
textColor=BODY_GRAY,
leftIndent=14,
firstLineIndent=-10,
spaceAfter=1.8,
leading=12,
bulletIndent=4,
)
BULLET_BOLD_STYLE = ParagraphStyle(
'BulletBold',
fontName='Helvetica-Bold',
fontSize=9,
textColor=BODY_GRAY,
leftIndent=14,
firstLineIndent=-10,
spaceAfter=1.8,
leading=12,
)
CAPTION_STYLE = ParagraphStyle(
'Caption',
fontName='Helvetica-Oblique',
fontSize=7.5,
textColor=SUBTITLE_GRAY,
alignment=TA_CENTER,
spaceAfter=4,
)
TEAL_BULLET = f'<font color="#{ACCENT_TEAL.hexval()[2:]}">▶</font> '
def b(text):
"""Return a bullet paragraph."""
return Paragraph(TEAL_BULLET + text, BULLET_STYLE)
def bb(label, text):
"""Bold label bullet."""
return Paragraph(f'{TEAL_BULLET}<b>{label}:</b> {text}', BULLET_STYLE)
def section(text):
return Paragraph(text, SECTION_STYLE)
def title(text):
return Paragraph(text, TITLE_STYLE)
def subtitle(text):
return Paragraph(text, SUBTITLE_STYLE)
def hr():
return HRFlowable(width="100%", thickness=1.5, color=ACCENT_TEAL, spaceAfter=5, spaceBefore=3)
def caption(text):
return Paragraph(text, CAPTION_STYLE)
def img_block(key, width_mm, caption_text):
path = img_paths.get(key)
if path and os.path.exists(path):
w = width_mm * mm
im = Image(path, width=w, height=w * 0.65)
im.hAlign = 'CENTER'
return [im, caption(caption_text)]
return []
def shaded_box(items, bg=LIGHT_BG):
"""Wrap items in a light shaded table cell."""
inner = [i for i in items if i is not None]
t = Table([[inner]], colWidths=[155*mm])
t.setStyle(TableStyle([
('BACKGROUND', (0,0), (-1,-1), bg),
('BOX', (0,0), (-1,-1), 0.8, ACCENT_TEAL),
('TOPPADDING', (0,0),(-1,-1), 5),
('BOTTOMPADDING', (0,0),(-1,-1), 5),
('LEFTPADDING', (0,0),(-1,-1), 7),
('RIGHTPADDING', (0,0),(-1,-1), 7),
]))
return t
# ─── Build Document ───────────────────────────────────────────────────────────
OUTPUT = "/home/daytona/workspace/cardiomyopathy-presentation/Atypical_Cardiomyopathy_Children.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
topMargin=75, # room for header band
bottomMargin=40, # room for footer
leftMargin=22*mm,
rightMargin=22*mm,
)
story = []
# ══════════════════════════════════════════════════════════════════════════════
# PAGE 1 — Cover / Introduction & Overview
# ══════════════════════════════════════════════════════════════════════════════
story.append(title("Atypical Forms of Cardiomyopathy"))
story.append(title("in Children and Adolescents"))
story.append(subtitle("A Structured Clinical Reference for 4th Year MBBS Students"))
story.append(hr())
story.append(section("■ What are Atypical Cardiomyopathies?"))
story += [
b("Cardiomyopathies are diseases of the heart muscle causing structural and functional abnormalities"),
b("<b>Atypical</b> forms differ from classic dilated, hypertrophic, and restrictive cardiomyopathy"),
b("Include: Left Ventricular Non-Compaction (LVNC), ARVC, Takotsubo, Mitochondrial & Metabolic types"),
b("Collectively represent a growing diagnostic challenge in pediatric cardiology"),
b("Paediatric incidence estimated at 1.13 per 100,000 children per year for all cardiomyopathies"),
b("Atypical forms account for up to 15–20% of all childhood cardiomyopathy diagnoses"),
]
story.append(Spacer(1, 4))
story.append(section("■ Classification Framework (AHA 2006 / ESC 2008)"))
story += [
b("Primary cardiomyopathies: Genetic, Mixed (genetic + acquired), Acquired"),
b("Secondary cardiomyopathies: Due to systemic diseases — infiltrative, storage, toxic, inflammatory"),
b("Atypical forms often overlap multiple categories — requires multimodality evaluation"),
b("MOGE(S) classification (2013): morpho-functional, organ, genetics, etiology, functional status"),
b("Phenotype-genotype correlation is critical for prognosis and family screening"),
]
story.append(Spacer(1, 4))
story.append(section("■ Why Children are Different from Adults"))
story += [
b("Genetic mutations are more frequently the primary cause in pediatric patients"),
b("Metabolic and mitochondrial disorders are proportionally more common in young children"),
b("Neonates may present with transient cardiomyopathy (e.g., infant of diabetic mother)"),
b("Reversible forms (Takotsubo, tachycardia-induced) are increasingly recognized in adolescents"),
b("Sudden cardiac death is a major risk — often the first clinical presentation in ARVC"),
b("Echocardiography, cardiac MRI, and genetic testing form the diagnostic triad in children"),
b("Family cascade screening is mandatory once a pathogenic mutation is identified"),
b("Treatment goals: prevent SCD, preserve cardiac function, manage heart failure, enable normal development"),
]
story.append(Spacer(1, 4))
# Two-column layout: text + image
col1 = [
section("■ Key Diagnostic Modalities"),
b("Echocardiography: first-line — assesses structure, function, trabeculations"),
b("Cardiac MRI: gold standard for ARVC, LVNC, and myocardial fibrosis"),
b("Genetic panel testing: identifies sarcomere, desmosome, and metabolic mutations"),
b("24-hour Holter monitoring: detects arrhythmias in ARVC and LVNC"),
b("Exercise stress testing: unmaskes provoked arrhythmias in adolescents"),
]
col2_items = img_block("misc_echo", 72, "Fig 1. Echo & CMR in pediatric cardiomyopathy (MIS-C)")
if col2_items:
t = Table([[col1, col2_items]], colWidths=[88*mm, 77*mm])
t.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('TOPPADDING', (0,0), (-1,-1), 0),
('BOTTOMPADDING', (0,0), (-1,-1), 0),
('INNERGRID', (0,0), (-1,-1), 0, colors.white),
]))
story.append(t)
else:
story += col1
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# PAGE 2 — Left Ventricular Non-Compaction (LVNC)
# ══════════════════════════════════════════════════════════════════════════════
story.append(title("Left Ventricular Non-Compaction (LVNC)"))
story.append(subtitle("Spongy Myocardium — An Unclassified / Genetic Cardiomyopathy"))
story.append(hr())
col_text = [
section("■ Definition & Pathophysiology"),
b("Failure of normal myocardial compaction during embryogenesis (5th–8th week of gestation)"),
b("Results in prominent trabeculations and deep intertrabecular recesses in the LV"),
b("Creates a characteristic two-layer myocardium: thin compacted epicardial + thick spongy endocardial layer"),
b("NC/C ratio (non-compacted to compacted): >2.3 by echo (Jenni), >2 by CMR (Petersen) — diagnostic"),
b("Trabeculated LV mass >20% of global LV mass on CMR is diagnostic (Jacquier criteria)"),
Spacer(1, 4),
section("■ Genetics"),
b("X-linked: TAZ gene mutation → Barth Syndrome (males, neutropenia, skeletal myopathy)"),
b("Autosomal dominant: MYH7, MYBPC3, ACTC1, TPM1 (sarcomere genes)"),
b("LIM domain binding protein 3 (ZASP/LDB3), SCN5A, CASQ2 also implicated"),
b("Familial LVNC in 18–50% of cases — screening of 1st degree relatives essential"),
b("Can present as isolated LVNC or combined with HCM, DCM, or congenital heart disease"),
Spacer(1, 4),
section("■ Clinical Presentation in Children"),
b("Heart failure: most common — dyspnoea, feeding difficulties in infants, exercise intolerance"),
b("Arrhythmias: Wolff-Parkinson-White (WPW), ventricular tachycardia, AF in older children"),
b("Thromboembolic events: stroke or peripheral emboli due to stasis in recesses"),
b("Barth Syndrome: males < 5 years, cardiomegaly, cyclic neutropenia, growth retardation"),
]
col_img = img_block("lvnc_echo", 76, "Fig 2. LVNC echo — deep trabeculations with color Doppler flow into recesses")
t = Table([[col_text, col_img]], colWidths=[91*mm, 78*mm])
t.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('TOPPADDING', (0,0), (-1,-1), 0),
('BOTTOMPADDING', (0,0), (-1,-1), 0),
]))
story.append(t)
story.append(Spacer(1, 4))
story.append(section("■ Diagnosis"))
story += [
b("Echocardiography: Jenni criteria — NC/C >2.3 at end-systole in parasternal short-axis view"),
b("CMR: Petersen criteria — NC/C >2.3 at end-diastole; superior soft-tissue contrast over echo"),
b("ECG: left bundle branch block, pre-excitation (WPW), ST-T changes, prolonged QTc"),
b("Genetic testing: multi-gene panel including sarcomere and metabolic genes"),
]
story.append(Spacer(1, 3))
story.append(section("■ Management & Prognosis"))
story += [
b("Heart failure: ACE inhibitors / ARBs, beta-blockers, diuretics — standard HF therapy"),
b("Anticoagulation: warfarin / LMWH for LV thrombus, systemic embolism, or EF <35%"),
b("ICD implantation: for sustained VT, EF <35%, or syncope with high-risk genetic mutation"),
b("Cardiac resynchronisation therapy (CRT): for LBBB with severe LV dysfunction"),
b("Heart transplantation: end-stage disease refractory to medical therapy"),
b("Prognosis: variable — childhood-onset LVNC with heart failure has worse outcomes than adults"),
b("Improvement noted in Barth Syndrome with aggressive management of cardiomyopathy and neutropenia"),
]
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# PAGE 3 — ARVC
# ══════════════════════════════════════════════════════════════════════════════
story.append(title("Arrhythmogenic Right Ventricular Cardiomyopathy (ARVC)"))
story.append(subtitle("Desmosomal Disease — A Leading Cause of Sudden Cardiac Death in Young Athletes"))
story.append(hr())
col_text = [
section("■ Definition & Pathology"),
b("Autosomal dominant inherited cardiomyopathy primarily affecting the right ventricle"),
b("Progressive fibrofatty replacement of RV cardiomyocytes — the pathological hallmark"),
b("'Triangle of dysplasia': RV inflow, RV outflow tract, and RV apex are most affected"),
b("Left ventricular involvement occurs in advanced disease — may mimic DCM"),
b("Predominantly affects adolescents and young adults; rarely presents before age 12 years"),
b("Prevalence: 1 in 1,000–5,000; male predominance (M:F = 2.9:1) in adolescents"),
Spacer(1, 4),
section("■ Genetic Basis"),
b("Desmosomal gene mutations in >50% of cases: PKP2 (most common), DSP, DSG2, DSC2, JUP"),
b("PKP2 encodes plakophilin-2 — essential for desmosome integrity at intercalated discs"),
b("Non-desmosomal: TMEM43, PLN (phospholamban), RYR2 — associated with arrhythmic storms"),
b("Penetrance is incomplete — same mutation causes variable expression within families"),
b("Exercise accelerates disease progression — intense training must be restricted"),
]
col_img = img_block("arvc_ecg", 76, "Fig 3. ARVC — ECG (T-inv V1–V5, Epsilon waves), RV dilatation on MRI, fibro-fatty histology")
t = Table([[col_text, col_img]], colWidths=[91*mm, 78*mm])
t.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('TOPPADDING', (0,0), (-1,-1), 0),
('BOTTOMPADDING', (0,0), (-1,-1), 0),
]))
story.append(t)
story.append(Spacer(1, 4))
story.append(section("■ Clinical Presentation & ECG Features"))
story += [
b("Palpitations, presyncope, syncope — often triggered by exercise in young athletes"),
b("Sustained VT with LBBB morphology — indicates RV origin; inferior axis suggests RVOT"),
b("ECG hallmarks: T-wave inversions in V1–V3, Epsilon wave (post-QRS notch) in V1–V3"),
b("Epsilon wave: low-amplitude potential after QRS due to delayed RV activation — pathognomonic"),
b("Sudden cardiac death (SCD): may be the first clinical event — ARVC accounts for 5–11% of SCD in young"),
b("Right heart failure: a late feature — raised JVP, hepatomegaly, peripheral oedema"),
]
story.append(Spacer(1, 3))
story.append(section("■ Task Force Criteria (Revised 2010) — Diagnosis"))
story += [
b("Major criteria: RV dysfunction (echo/MRI/angiography), fibrofatty replacement on biopsy, repolarisation abnormalities (TWI V1–V3), Epsilon wave, VT with LBBB, pathogenic desmosomal mutation"),
b("Minor criteria: mild RV dilation, non-sustained VT, late potentials on SAECG, family history"),
b("Definite diagnosis: 2 major OR 1 major + 2 minor OR 4 minor criteria"),
b("Probable: 1 major + 1 minor OR 3 minor; Possible: 1 major OR 2 minor"),
]
story.append(Spacer(1, 3))
story.append(section("■ Management"))
story += [
b("ICD implantation: first-line for SCD prevention in high-risk patients — mandatory for survivors of VF"),
b("Anti-arrhythmic drugs: sotalol, amiodarone — adjunct to ICD, not monotherapy for SCD prevention"),
b("Beta-blockers: symptomatic VT suppression; obligatory post-ICD implantation"),
b("Restriction from competitive sports: vigorous exercise accelerates progression — class I recommendation"),
b("Catheter ablation: for recurrent VT episodes refractory to medication"),
b("Heart transplant: biventricular failure or intractable arrhythmias unresponsive to all therapy"),
]
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# PAGE 4 — Takotsubo & Mitochondrial/Metabolic Cardiomyopathy
# ══════════════════════════════════════════════════════════════════════════════
story.append(title("Takotsubo Syndrome & Metabolic / Mitochondrial Cardiomyopathies"))
story.append(subtitle("Stress-Induced Reversible Cardiomyopathy & Inborn Errors Affecting the Myocardium"))
story.append(hr())
# Takotsubo section
story.append(section("■ Takotsubo Cardiomyopathy (Stress / 'Broken Heart' Syndrome)"))
col_left = [
b("Named after the Japanese octopus trap — describes the LV apical ballooning shape"),
b("Characterized by transient, reversible LV dysfunction after intense emotional or physical stress"),
b("Catecholamine surge → direct myocardial toxicity + microvascular coronary spasm"),
b("Extreme rarity in children; more common in adolescents; females > males in adults"),
b("Triggers in children: acute neurological events (ICH, AVM), surgery, asthma exacerbation, sepsis"),
b("Mimics acute MI: chest pain, ST elevation, troponin rise — but coronary arteries are normal"),
b("Apical form (classic): apical ballooning + basal hypercontractility — most common in children"),
b("Mayo Clinic diagnostic criteria: transient LV dysfunction, absence of obstructive CAD,"),
b(" new ECG changes or troponin elevation, no pheochromocytoma or myocarditis"),
b("Recovery typically within 4–8 weeks — supportive care with ACEi and beta-blockers"),
b("Recurrence risk ~2% per year — long-term follow-up with echo recommended"),
]
col_right = img_block("takotsubo", 76, "Fig 4. Takotsubo — apical ballooning (4-chamber echo), basal hypercontractility preserved")
t = Table([[col_left, col_right]], colWidths=[89*mm, 78*mm])
t.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('TOPPADDING', (0,0), (-1,-1), 0),
('BOTTOMPADDING', (0,0), (-1,-1), 0),
]))
story.append(t)
story.append(Spacer(1, 5))
story.append(section("■ Mitochondrial Cardiomyopathy"))
story += [
b("Mitochondrial DNA (mtDNA) mutations or nuclear DNA mutations impair oxidative phosphorylation"),
b("Heart muscle has highest energy demand — myocardium is particularly vulnerable to ATP depletion"),
b("Phenotype: most commonly HCM, but may evolve to DCM or mixed HCM-DCM in children"),
b("MELAS syndrome: mitochondrial myopathy, encephalopathy, lactic acidosis, stroke-like episodes"),
b("MERRF syndrome: myoclonus epilepsy with ragged red fibers — cardiomyopathy + arrhythmias"),
b("Kearns-Sayre syndrome: onset <20 years — ptosis, PEO, complete heart block, cardiomyopathy"),
b("Treatment: CoQ10 supplementation, riboflavin, L-carnitine — limited evidence but widely used"),
b("Pacemaker/ICD: for complete heart block and malignant arrhythmias"),
]
story.append(Spacer(1, 4))
story.append(section("■ Barth Syndrome — LVNC + Metabolic Disease"))
story += [
b("X-linked recessive; TAZ (tafazzin) gene mutation on chromosome Xq28"),
b("Defective cardiolipin remodelling in inner mitochondrial membrane"),
b("Presents in boys before age 5: cardiomegaly (LVNC), cyclic neutropenia, skeletal myopathy"),
b("Urine: elevated 3-methylglutaconic acid — specific screening test"),
b("Diagnosis confirmed by low cardiolipin in platelets/fibroblasts or TAZ gene mutation"),
b("Prognosis improved significantly with aggressive HF management and G-CSF for neutropenia"),
b("Cardiac function may improve after infancy — intermittent course with periods of remodelling"),
]
story.append(PageBreak())
# ══════════════════════════════════════════════════════════════════════════════
# PAGE 5 — Additional Forms, Diagnosis Summary, Management Algorithm
# ══════════════════════════════════════════════════════════════════════════════
story.append(title("Additional Atypical Forms, Diagnostic Approach & Management Summary"))
story.append(subtitle("Tachycardia-Induced, Storage Disorders, Inflammatory & Clinical Algorithm"))
story.append(hr())
story.append(section("■ Tachycardia-Induced Cardiomyopathy (TIC)"))
story += [
b("LV dysfunction caused by sustained or incessant tachyarrhythmia — fully reversible with rhythm control"),
b("Most common culprit in children: incessant supraventricular tachycardia (SVT), permanent junctional reentrant tachycardia (PJRT)"),
b("EF often <40% at presentation — mimics primary DCM; recovery within weeks of restoring sinus rhythm"),
b("Key clue: age-inappropriate resting heart rate or documented tachycardia on ECG/Holter"),
b("Treatment: rate/rhythm control (amiodarone, beta-blockers, flecainide) → catheter ablation if refractory"),
b("High suspicion needed: do NOT start transplant evaluation before ruling out TIC"),
]
story.append(Spacer(1, 4))
story.append(section("■ Storage & Infiltrative Cardiomyopathies"))
story += [
b("Pompe disease (glycogen storage type II): acid alpha-glucosidase deficiency → massive hypertrophic CM"),
b("Fabry disease (X-linked): alpha-galactosidase A deficiency → progressive LVH + renal & neurological involvement"),
b("Mucopolysaccharidoses (MPS I, II, VI): valvular thickening, HCM, coronary arterial disease"),
b("Gaucher disease: glucocerebrosidase deficiency — pericardial involvement, rare CM"),
b("Hemochromatosis (adolescents): iron overload → DCM; ferritin + transferrin saturation screening"),
b("Cardiac amyloidosis: rare in childhood; secondary AL/AA amyloid deposits in systemic disease"),
]
story.append(Spacer(1, 4))
story.append(section("■ Inflammatory & Immune-Mediated Cardiomyopathy"))
story += [
b("Post-viral myocarditis (enterovirus, parvovirus B19, CMV) → chronic inflammatory DCM"),
b("MIS-C (multisystem inflammatory syndrome in children post-COVID-19): acute myocardial dysfunction"),
b("Autoimmune: systemic lupus erythematosus (SLE), dermatomyositis — pericarditis and cardiomyopathy"),
b("Giant cell myocarditis: rare but fulminant; requires high-dose immunosuppression and early transplant"),
b("Endomyocardial biopsy: diagnostic gold standard for myocarditis / inflammatory cardiomyopathy"),
]
story.append(Spacer(1, 4))
# Summary table with image
col_summary = [
section("■ Diagnostic Approach Algorithm"),
b("<b>Step 1 — History:</b> Family SCD, syncope, palpitations, fatigue, birth history, maternal diabetes"),
b("<b>Step 2 — ECG:</b> T-wave inversions, Epsilon waves, WPW, LBBB, QTc prolongation"),
b("<b>Step 3 — Echo:</b> LV dimensions, EF, trabeculations (LVNC), RV size (ARVC), apical ballooning (Takotsubo)"),
b("<b>Step 4 — CMR:</b> LGE for fibrosis, fat suppression for ARVC, NC/C ratio for LVNC"),
b("<b>Step 5 — Lab:</b> Troponin, BNP, lactate, urine organic acids, lysosomal enzymes, iron studies"),
b("<b>Step 6 — Genetics:</b> Multi-gene cardiomyopathy panel — desmosome, sarcomere, metabolic genes"),
b("<b>Step 7 — Family:</b> Cascade screening of 1st degree relatives for any identified mutation"),
]
col_img2 = img_block("dcm_echo", 76, "Fig 5. Dilated LV on echo — pediatric DCM with LV thrombus (arrow)")
t = Table([[col_summary, col_img2]], colWidths=[91*mm, 78*mm])
t.setStyle(TableStyle([
('VALIGN', (0,0), (-1,-1), 'TOP'),
('LEFTPADDING', (0,0), (-1,-1), 0),
('RIGHTPADDING', (0,0), (-1,-1), 0),
('TOPPADDING', (0,0), (-1,-1), 0),
('BOTTOMPADDING', (0,0), (-1,-1), 0),
]))
story.append(t)
story.append(Spacer(1, 4))
story.append(section("■ General Management Principles"))
story += [
b("Heart failure: ACEi/ARB + beta-blocker + diuretic; SGLT2 inhibitors emerging in adolescents"),
b("SCD prevention: ICD for EF <35%, sustained VT, aborted SCD — regardless of aetiology"),
b("Activity restriction: all children with symptomatic cardiomyopathy or ARVC — avoid competitive sports"),
b("Genetic counselling: obligatory for all familial forms — discuss penetrance and recurrence risk"),
b("Multidisciplinary team: paediatric cardiologist, geneticist, metabolic physician, transplant team"),
b("Transplantation: for refractory end-stage disease — paediatric outcomes are excellent (1-year survival ~90%)"),
b("Follow-up: 3–6 monthly echocardiography + Holter; annual CMR in ARVC and LVNC"),
]
# ─── Build PDF ────────────────────────────────────────────────────────────────
doc.build(story, onFirstPage=page_template, onLaterPages=page_template)
print(f"\n✓ PDF created: {OUTPUT}")
cd /home/daytona/workspace/cardiomyopathy-presentation && python3 build_pdf.py 2>&1
ls -lh /home/daytona/workspace/cardiomyopathy-presentation/Atypical_Cardiomyopathy_Children.pdf && python3 -c " from pypdf import PdfReader r = PdfReader('/home/daytona/workspace/cardiomyopathy-presentation/Atypical_Cardiomyopathy_Children.pdf') print(f'Pages: {len(r.pages)}') page = r.pages[0] w, h = float(page.mediabox.width), float(page.mediabox.height) print(f'Page size: {w:.1f} x {h:.1f} pt (A4 = 595.3 x 841.9 pt)') print('First page text (snippet):', r.pages[0].extract_text()[:200]) "
Atypical Cardiomyopathy Children
PDF Document · PDF
| Page | Topic | Image |
|---|---|---|
| 1 | Introduction, classification framework, why children differ, diagnostic modalities | Echo + CMR in MIS-C |
| 2 | Left Ventricular Non-Compaction (LVNC) — genetics, Barth syndrome, diagnosis, management | LVNC echo with color Doppler trabeculations |
| 3 | ARVC — desmosomal genetics, Task Force criteria, ECG hallmarks (Epsilon wave), SCD risk, ICD | Multi-panel ARVC ECG + MRI + histology |
| 4 | Takotsubo syndrome + Mitochondrial cardiomyopathies (MELAS, Kearns-Sayre, Barth) | Takotsubo apical ballooning echo |
| 5 | TIC, storage/infiltrative disorders, MIS-C, diagnostic algorithm (7 steps), management principles | Dilated LV echo with thrombus |
Create it as paper suitable i need to print it
ls /home/daytona/workspace/cardiomyopathy-presentation/images/ && ls -lh /home/daytona/workspace/cardiomyopathy-presentation/
Regenerate the PDF with print-optimized layout (white background, minimal colors, black text)