~/parasitology/make_pdf.py
from reportlab.platypus import (
SimpleDocTemplate, Table, TableStyle, Paragraph, Spacer,
HRFlowable, PageBreak
)
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.units import mm
from reportlab.lib.enums import TA_CENTER, TA_LEFT
OUTPUT = "/tmp/workspace/parasitology/Parasitology_Q&A_Summary.pdf"
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
leftMargin=15*mm, rightMargin=15*mm,
topMargin=18*mm, bottomMargin=15*mm,
)
styles = getSampleStyleSheet()
# Custom styles
TITLE_STYLE = ParagraphStyle(
"title", parent=styles["Heading1"],
fontSize=16, textColor=colors.HexColor("#1a237e"),
alignment=TA_CENTER, spaceAfter=4, leading=20,
)
SUBTITLE_STYLE = ParagraphStyle(
"subtitle", parent=styles["Normal"],
fontSize=10, textColor=colors.HexColor("#37474f"),
alignment=TA_CENTER, spaceAfter=2,
)
REF_STYLE = ParagraphStyle(
"ref", parent=styles["Normal"],
fontSize=8, textColor=colors.HexColor("#78909c"),
alignment=TA_CENTER, spaceAfter=10,
)
Q_STYLE = ParagraphStyle(
"qhead", parent=styles["Normal"],
fontSize=10, textColor=colors.HexColor("#b71c1c"),
fontName="Helvetica-Bold", spaceAfter=0, leading=13,
)
CELL_STYLE = ParagraphStyle(
"cell", parent=styles["Normal"],
fontSize=8.5, leading=12, spaceAfter=0,
textColor=colors.HexColor("#212121"),
)
CELL_BOLD = ParagraphStyle(
"cellb", parent=styles["Normal"],
fontSize=8.5, leading=12, fontName="Helvetica-Bold",
textColor=colors.HexColor("#1a237e"),
)
BANGLA_STYLE = ParagraphStyle(
"bangla", parent=styles["Normal"],
fontSize=8.5, leading=12, spaceAfter=0,
textColor=colors.HexColor("#1b5e20"),
)
FOOTER_STYLE = ParagraphStyle(
"footer", parent=styles["Normal"],
fontSize=7.5, textColor=colors.HexColor("#78909c"),
alignment=TA_CENTER,
)
def p(text, style=CELL_STYLE):
return Paragraph(text, style)
def section_header(num, question):
return Paragraph(f"Q{num}. {question}", Q_STYLE)
# ─── DATA ─────────────────────────────────────────────────────────────────────
# Each entry: (Q#, Question, English Key Points, Bangla Summary)
data = [
(
1,
"Define parasite and host. Classify host with example.",
[
("<b>Parasite:</b> Organism living on/in host, takes nutrition, causes harm.<br/>"
"Ex: <i>Plasmodium</i> (malaria), <i>Entamoeba histolytica</i>"),
("<b>Host:</b> Organism providing food & shelter to parasite."),
("<b>Classification of Host:</b><br/>"
"• <b>Definitive:</b> Adult/sexual stage. Ex: Mosquito (<i>Plasmodium</i>)<br/>"
"• <b>Intermediate:</b> Larval/asexual stage. Ex: Human (<i>Plasmodium</i>), Pig (<i>Taenia</i>)<br/>"
"• <b>Reservoir:</b> Source of infection. Ex: Dog (<i>Leishmania</i>)<br/>"
"• <b>Accidental:</b> Not normal host. Ex: Human (<i>Echinococcus</i>)<br/>"
"• <b>Paratenic:</b> Survives but no development. Ex: Fish (<i>Anisakis</i>)"),
],
("• পরজীবী = অন্য জীবে থেকে খাদ্য নেয়, ক্ষতি করে\n"
"• পোষক = আশ্রয় ও খাদ্য দেয়\n"
"• নিশ্চিত পোষক → প্রাপ্তবয়স্ক পরজীবী (মশা)\n"
"• মধ্যবর্তী পোষক → লার্ভা দশা (মানুষ, শূকর)\n"
"• আধার পোষক → সংক্রমণের উৎস (কুকুর)\n"
"• দুর্ঘটনাজনিত পোষক → স্বাভাবিক নয় (মানুষ)\n"
"[Ref: Murray Medical Microbiology 9e, Ch.67 p.764]"),
),
(
2,
"How can you classify parasites with example?",
[
("<b>By Location:</b><br/>"
"• Ectoparasite (outside): Lice, Tick, Mite<br/>"
"• Endoparasite (inside): <i>Plasmodium</i>, <i>Ascaris</i>"),
("<b>By Dependency:</b><br/>"
"• Obligate: cannot live without host → <i>P. falciparum</i><br/>"
"• Facultative: can live freely → <i>Naegleria fowleri</i>"),
("<b>By Duration:</b><br/>"
"• Permanent: always in host → <i>Trichinella</i><br/>"
"• Temporary: visits to feed → Mosquito, Leech"),
("<b>Taxonomic (Most Important):</b><br/>"
"• Protozoa (unicellular): <i>Plasmodium, Entamoeba, Giardia, Leishmania</i><br/>"
"• Helminths: Nematoda (<i>Ascaris</i>), Trematoda (<i>Schistosoma</i>), Cestoda (<i>Taenia</i>)<br/>"
"• Arthropods: Mosquito, Tick, Sandfly"),
],
("• বাহিরে = বহিঃপরজীবী (উকুন, টিক)\n"
"• ভেতরে = অন্তঃপরজীবী (কৃমি, ম্যালেরিয়া)\n"
"• বাধ্যতামূলক vs ঐচ্ছিক\n"
"• স্থায়ী vs অস্থায়ী\n"
"• প্রোটোজোয়া / হেলমিন্থ / আর্থ্রোপড\n"
"[Ref: Murray 9e, Ch.67, Table 67.2 p.765]"),
),
(
3,
"What is parasitism? Criteria? Symbiosis, mutualism, commensalism?",
[
("<b>Parasitism:</b> One organism (parasite) benefits; other (host) is harmed.<br/>"
"It is a one-way benefit, harmful relationship."),
("<b>Criteria of Parasitism:</b><br/>"
"1. Lives on/in host | 2. Takes nutrition from host<br/>"
"3. Host is harmed | 4. Metabolically dependent<br/>"
"5. Evolved/adapted relationship"),
("<b>Three Symbiotic Relationships:</b><br/>"
"• <b>Mutualism:</b> BOTH benefit. Ex: Gut bacteria + human<br/>"
"• <b>Commensalism:</b> One benefits, other unaffected.<br/>"
" Ex: <i>Entamoeba coli</i> in gut (eats waste, no harm)<br/>"
"• <b>Parasitism:</b> One benefits, other HARMED.<br/>"
" Ex: <i>Plasmodium</i> → malaria"),
],
("• পরজীবিতা = একজনের লাভ, অপরজনের ক্ষতি\n"
"• শর্ত: পোষকে থাকা + খাদ্য নেওয়া + ক্ষতি করা\n"
"• মিউচুয়ালিজম: দুজনেরই লাভ (অন্ত্রের ব্যাকটেরিয়া)\n"
"• কমেনসালিজম: একজনের লাভ, অপরজন অপ্রভাবিত\n"
" (Entamoeba coli)\n"
"• পরজীবিতা: একজন লাভবান, অপরজন ক্ষতিগ্রস্ত\n"
"[Ref: Jawetz 28e; Murray 9e, Ch.67]"),
),
(
4,
"What is parasitic infection and parasitic disease?",
[
("<b>Parasitic Infection:</b><br/>"
"Parasite is PRESENT in host but NO symptoms.<br/>"
"Host may be asymptomatic carrier.<br/>"
"Ex: <i>E. histolytica</i> cysts in gut with no symptoms."),
("<b>Parasitic Disease:</b><br/>"
"Infection + tissue damage + clinical symptoms appear.<br/>"
"Ex: Bloody diarrhea (amoebic dysentery) = disease."),
("<b>Key Rule:</b><br/>"
"Infection = parasite present (silent)<br/>"
"Disease = infection + symptoms + damage<br/><br/>"
"<b>Factors determining progression:</b> Parasite load,<br/>"
"virulence, host immune status, nutritional status"),
],
("• সংক্রমণ = পরজীবী আছে, লক্ষণ নেই (চুপ করে)\n"
"• রোগ = পরজীবী আছে + টিস্যু ক্ষতি + লক্ষণ আছে\n"
"• উদাহরণ: সিস্ট বহন (সংক্রমণ) → আমাশয় (রোগ)\n"
"• কে রোগে পরিণত হবে? → পরজীবীর সংখ্যা, ভাইরুলেন্স,\n"
" রোগ প্রতিরোধ ক্ষমতার উপর নির্ভর করে\n"
"[Ref: Murray 9e, Ch.67, p.764]"),
),
(
5,
"What is zoonosis, vector and carrier? Differences?",
[
("<b>Zoonosis:</b> Disease spreading from animals → humans naturally.<br/>"
"Ex: Rabies (dog), Leishmaniasis (dog/rodent via sandfly), Toxoplasmosis (cat)"),
("<b>Vector:</b> Arthropod/organism transmitting pathogen host→host.<br/>"
"• Biological vector: parasite develops INSIDE.<br/>"
" Ex: <i>Anopheles</i> mosquito for <i>Plasmodium</i> (sexual stage inside)<br/>"
"• Mechanical vector: carries on surface only, no development.<br/>"
" Ex: Housefly carrying <i>E. histolytica</i> cysts"),
("<b>Carrier:</b> Person/animal harboring pathogen WITHOUT symptoms,<br/>"
"but can transmit it to others.<br/>"
"Ex: Asymptomatic person shedding <i>E. histolytica</i> cysts in stool"),
("<b>Differences:</b><br/>"
"Vector = arthropod, active transmission (bites)<br/>"
"Carrier = human/animal, passive (fecal-oral etc.)"),
],
("• জুনোসিস = প্রাণী থেকে মানুষে ছড়ানো রোগ\n"
" (জলাতঙ্ক, কালাজ্বর, টক্সোপ্লাজমোসিস)\n"
"• ভেক্টর = পোকা যে রোগ ছড়ায়\n"
" - জৈবিক: ভেতরে বিকাশ (মশা)\n"
" - যান্ত্রিক: শুধু গায়ে বহন (মাছি)\n"
"• ক্যারিয়ার = উপসর্গহীন মানুষ যে জীবাণু ছড়ায়\n"
"• পার্থক্য: ভেক্টর সক্রিয়, ক্যারিয়ার নিষ্ক্রিয়\n"
"[Ref: Sherris & Ryan 8e; Murray 9e, Ch.67]"),
),
(
6,
"Organs of locomotion of protozoa. Modes of reproduction?",
[
("<b>Locomotion Organelles:</b><br/>"
"• <b>Pseudopodia:</b> Cytoplasmic extensions → <i>Entamoeba histolytica</i><br/>"
"• <b>Flagella:</b> Long whip-like → <i>Giardia, Leishmania, Trypanosoma</i><br/>"
"• <b>Cilia:</b> Short hairs covering surface → <i>Balantidium coli</i><br/>"
"• <b>Undulating membrane:</b> Wave-like fin → <i>Trichomonas, Trypanosoma</i><br/>"
"• <b>Gliding:</b> Surface proteins, no organelle → <i>Plasmodium</i> sporozoites"),
("<b>Asexual Reproduction:</b><br/>"
"• <b>Binary fission:</b> 1→2 equal cells → <i>Entamoeba, Giardia</i><br/>"
"• <b>Schizogony:</b> 1→many (merozoites) → <i>Plasmodium</i> in RBCs/liver<br/>"
"• <b>Endodyogeny/Budding:</b> 2 daughters inside mother → <i>Toxoplasma</i>"),
("<b>Sexual Reproduction:</b><br/>"
"• <b>Gametogony:</b> Male + female gametes fuse → <i>Plasmodium</i> (in mosquito)<br/>"
"• <b>Conjugation:</b> Two cells exchange nuclei → <i>Balantidium coli</i>"),
],
("• সিউডোপোডিয়া: আমিবার মতো চলে (Entamoeba)\n"
"• ফ্ল্যাজেলা: লম্বা লেজ (Giardia, Leishmania)\n"
"• সিলিয়া: ছোট লোম (Balantidium)\n"
"• আন্ডুলেটিং মেমব্রেন (Trichomonas)\n\n"
"অযৌন প্রজনন:\n"
"• দ্বিবিভাজন → Entamoeba\n"
"• বহুবিভাজন (Schizogony) → Plasmodium\n"
"• মুকুলোদগম → Toxoplasma\n"
"যৌন প্রজনন:\n"
"• গ্যামেটোগনি → Plasmodium (মশায়)\n"
"• সংযুগ → Balantidium\n"
"[Ref: Murray 9e, Ch.67, p.764-765]"),
),
(
7,
"Name five protozoa. How do protozoa differ from metazoa?",
[
("<b>Five Medically Important Protozoa:</b><br/>"
"1. <i>Plasmodium falciparum</i> → Malaria<br/>"
"2. <i>Entamoeba histolytica</i> → Amoebic dysentery & liver abscess<br/>"
"3. <i>Giardia lamblia</i> → Giardiasis (malabsorption, diarrhea)<br/>"
"4. <i>Leishmania donovani</i> → Kala-azar (visceral leishmaniasis)<br/>"
"5. <i>Trypanosoma brucei</i> → African sleeping sickness"),
("<b>Protozoa vs Metazoa:</b><br/>"
"• Cell number: Unicellular vs Multicellular<br/>"
"• Size: 2–100 µm (micro) vs mm–meters (macro)<br/>"
"• Tissue/organs: Absent vs Present<br/>"
"• Reproduction: Fission/schizogony vs Sexual (eggs/larvae)<br/>"
"• Locomotion: Pseudopodia/flagella/cilia vs Muscles<br/>"
"• Examples: <i>Plasmodium, Giardia</i> vs <i>Ascaris, Taenia</i>"),
],
("পাঁচটি প্রোটোজোয়া:\n"
"1. Plasmodium falciparum → ম্যালেরিয়া\n"
"2. Entamoeba histolytica → আমাশয়\n"
"3. Giardia lamblia → জিয়ার্ডিয়াসিস\n"
"4. Leishmania donovani → কালাজ্বর\n"
"5. Trypanosoma brucei → ঘুম রোগ\n\n"
"পার্থক্য:\n"
"• প্রোটোজোয়া = ১ কোষ, ক্ষুদ্র, টিস্যু নেই\n"
"• মেটাজোয়া = বহু কোষ, দৃশ্যমান, টিস্যু-অঙ্গ আছে\n"
"[Ref: Murray 9e, Ch.67, Table 67.3, p.765]"),
),
(
8,
"Structures in different life cycle stages. Excystation & encystation?",
[
("<b>Trophozoite (Active/Feeding Stage):</b><br/>"
"• Nucleus, cytoplasm, food vacuoles, ribosomes<br/>"
"• Locomotion organelles (pseudopodia/flagella/cilia)<br/>"
"• Fragile — dies easily outside host"),
("<b>Cyst Stage (Dormant/Infective):</b><br/>"
"• Thick protective cyst wall (resists drying, chlorine)<br/>"
"• Multiple nuclei: <i>E. histolytica</i> = 4 nuclei; <i>Giardia</i> = 4 nuclei<br/>"
"• Chromatoid bodies (RNA/protein reserve)<br/>"
"• Glycogen vacuole (energy reserve)<br/>"
"• THIS is the infective stage for new host"),
("<b>Other Stages (Apicomplexa):</b><br/>"
"• Sporozoite: infective stage in mosquito saliva<br/>"
"• Merozoite: from schizogony in RBCs<br/>"
"• Gametocyte: sexual stage in blood"),
("<b>Encystation</b> (Trophozoite → Cyst):<br/>"
"Unfavorable environment (e.g., colon drying) →<br/>"
"Rounds up, excretes water, builds thick wall → passed in stool<br/><br/>"
"<b>Excystation</b> (Cyst → Trophozoite):<br/>"
"Cyst swallowed → reaches small intestine →<br/>"
"Cyst wall breaks → metacystic trophozoites emerge → multiply"),
],
("দুটি প্রধান দশা:\n"
"• ট্রফোজয়েট: সক্রিয়, খাদ্যগ্রহণ করে, নাজুক\n"
"• সিস্ট: নিষ্ক্রিয়, মোটা প্রাচীর, টেকসই, সংক্রামক\n"
" (E. histolytica ও Giardia = ৪টি নিউক্লিয়াস)\n\n"
"অন্যান্য দশা (Plasmodium):\n"
"• স্পোরোজয়েট → মেরোজয়েট → গ্যামেটোসাইট\n\n"
"এনসিস্টেশন:\n"
"ট্রফোজয়েট → পরিবেশ খারাপ → সিস্ট তৈরি\n"
"এক্সসিস্টেশন:\n"
"সিস্ট → নতুন পোষকের ক্ষুদ্রান্ত্রে → ট্রফোজয়েট\n"
"[Ref: Murray 9e, Ch.67, p.764; Jawetz 28e]"),
),
(
9,
"How does protozoa cause disease and escape immune attack?",
[
("<b>How Disease is Caused (6 mechanisms):</b><br/>"
"1. Direct tissue destruction: <i>E. histolytica</i> cysteine proteases → intestinal ulcers<br/>"
"2. RBC destruction: <i>Plasmodium</i> → hemolytic anemia + fever<br/>"
"3. Mechanical blockage: <i>Giardia</i> suction disc → flattens villi → malabsorption<br/>"
"4. Toxin production: <i>Plasmodium</i> hemozoin → inflammation<br/>"
"5. Immune-mediated damage: cerebral malaria (immune cells damage brain)<br/>"
"6. Nutrient competition: parasites steal vitamins/nutrients"),
("<b>Immune Escape Mechanisms (6 ways):</b><br/>"
"1. <b>Antigenic variation:</b> Changes surface proteins constantly.<br/>"
" Classic: <i>Trypanosoma brucei</i> changes VSG coat → antibodies useless<br/>"
"2. <b>Intracellular hiding:</b> Hides inside cells (antibodies can't reach).<br/>"
" <i>Plasmodium</i> inside RBCs; <i>Leishmania</i> inside macrophages<br/>"
"3. <b>Cyst formation:</b> Thick wall = antibody-proof. <i>Toxoplasma</i> in brain<br/>"
"4. <b>Immunosuppression:</b> Suppresses T-cells. <i>Plasmodium, Leishmania</i><br/>"
"5. <b>Molecular mimicry:</b> Coats itself with host proteins. <i>Schistosoma</i><br/>"
"6. <b>Complement resistance:</b> Resists complement-mediated lysis"),
],
("রোগ করার ৬ উপায়:\n"
"1. টিস্যু ধ্বংস (Entamoeba)\n"
"2. RBC ভাঙা (Plasmodium)\n"
"3. যান্ত্রিক বাধা (Giardia)\n"
"4. বিষাক্ত পদার্থ (hemozoin)\n"
"5. ইমিউন-মধ্যস্থ ক্ষতি (সেরিব্রাল ম্যালেরিয়া)\n"
"6. পুষ্টি চুরি\n\n"
"ইমিউন এড়ানোর ৬ উপায়:\n"
"1. অ্যান্টিজেন পরিবর্তন (Trypanosoma VSG)\n"
"2. কোষের ভেতরে লুকানো (Plasmodium, Leishmania)\n"
"3. সিস্ট তৈরি (Toxoplasma)\n"
"4. T-কোষ দমন (Plasmodium)\n"
"5. পোষকের প্রোটিন চুরি (Schistosoma)\n"
"6. Complement প্রতিরোধ\n"
"[Ref: Murray 9e; Sherris 8e]"),
),
(
10,
"What are the harmful effects of protozoa on the host?",
[
("<b>Harmful Effects Summary:</b><br/>"
"1. <b>Blood:</b> Hemolytic anemia, jaundice → <i>Plasmodium</i><br/>"
"2. <b>Intestine:</b> Bloody diarrhea, flask-shaped ulcers → <i>E. histolytica</i><br/>"
"3. <b>Liver:</b> Amoebic liver abscess → <i>E. histolytica</i><br/>"
"4. <b>Nutrition:</b> Malabsorption, vitamin deficiency → <i>Giardia</i><br/>"
"5. <b>Fever/Inflammation:</b> Cyclical fever, hemozoin → <i>Plasmodium</i><br/>"
"6. <b>CNS:</b> Sleeping sickness, coma → <i>T. brucei</i><br/>"
" Fatal meningoencephalitis → <i>Naegleria fowleri</i><br/>"
" Cerebral malaria → <i>P. falciparum</i><br/>"
"7. <b>Immune:</b> Immunosuppression → <i>Plasmodium, Leishmania</i><br/>"
"8. <b>Spleen/Liver:</b> Massive splenomegaly, pancytopenia → <i>L. donovani</i><br/>"
"9. <b>Congenital:</b> Hydrocephalus, blindness, stillbirth → <i>T. gondii</i><br/>"
"10. <b>Kidney:</b> Acute renal failure → <i>P. falciparum</i> (severe)"),
],
("ক্ষতিকর প্রভাব:\n"
"1. রক্তশূন্যতা, জন্ডিস → Plasmodium\n"
"2. অন্ত্রে ঘা, আমাশয় → Entamoeba\n"
"3. লিভার ফোঁড়া → Entamoeba\n"
"4. পুষ্টিহীনতা → Giardia (ভিলাই নষ্ট)\n"
"5. পর্যায়ক্রমিক জ্বর → Plasmodium\n"
"6. মস্তিষ্কের ক্ষতি → Trypanosoma, Naegleria\n"
"7. রোগ প্রতিরোধ দুর্বল → Plasmodium, Leishmania\n"
"8. প্লীহা/লিভার বৃদ্ধি → Leishmania donovani\n"
"9. জন্মগত ক্ষতি → Toxoplasma\n"
"10. কিডনি বিকল → P. falciparum\n"
"[Ref: Murray 9e, Ch.67; Jawetz 28e; Sherris 8e]"),
),
]
# ─── BUILD PDF ────────────────────────────────────────────────────────────────
story = []
# Title block
story.append(Paragraph("Army Medical College Bogura", TITLE_STYLE))
story.append(Paragraph("Department of Microbiology", SUBTITLE_STYLE))
story.append(Paragraph("Card No. 05 (Second Term) | Parasitology (AMCB-06) | Item 01: Introduction to Parasitology", SUBTITLE_STYLE))
story.append(Paragraph("Quick Revision Summary — 10 Q&A (English & Bangla)", REF_STYLE))
story.append(Paragraph(
"Reference: Murray's Medical Microbiology 9e (Ch.67) | Jawetz 28e | Sherris & Ryan's 8e",
REF_STYLE
))
story.append(HRFlowable(width="100%", thickness=1.5, color=colors.HexColor("#1a237e"), spaceAfter=8))
# Column headers for mini-legend
legend_data = [
[
p("<b>Q#</b>", CELL_BOLD),
p("<b>Question</b>", CELL_BOLD),
p("<b>English Key Points</b>", CELL_BOLD),
p("<b>বাংলা সারসংক্ষেপ</b>", CELL_BOLD),
]
]
legend_table = Table(
legend_data,
colWidths=[10*mm, 45*mm, 80*mm, 50*mm],
style=TableStyle([
("BACKGROUND", (0,0), (-1,0), colors.HexColor("#1a237e")),
("TEXTCOLOR", (0,0), (-1,0), colors.white),
("FONTNAME", (0,0), (-1,0), "Helvetica-Bold"),
("FONTSIZE", (0,0), (-1,0), 9),
("ALIGN", (0,0), (-1,-1), "LEFT"),
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("TOPPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("GRID", (0,0), (-1,-1), 0.5, colors.HexColor("#90a4ae")),
])
)
story.append(legend_table)
# Row colors alternating
ROW_COLORS = [colors.HexColor("#e8eaf6"), colors.HexColor("#f3e5f5")]
BANGLA_BG = colors.HexColor("#e8f5e9")
for idx, (qnum, question, eng_points, bangla) in enumerate(data):
bg = ROW_COLORS[idx % 2]
eng_cell_content = []
for pt in eng_points:
eng_cell_content.append(p(pt, CELL_STYLE))
eng_cell_content.append(Spacer(1, 2))
bangla_lines = bangla.replace("[Ref:", "<br/><i>[Ref:").replace("]", "]</i>")
bangla_cell = p(bangla_lines, BANGLA_STYLE)
row_data = [
[
p(f"<b>Q{qnum}</b>", CELL_BOLD),
p(f"<b>{question}</b>", CELL_STYLE),
eng_cell_content,
bangla_cell,
]
]
t = Table(
row_data,
colWidths=[10*mm, 45*mm, 80*mm, 50*mm],
style=TableStyle([
("BACKGROUND", (0,0), (-1,-1), bg),
("BACKGROUND", (3,0), (3,-1), BANGLA_BG),
("VALIGN", (0,0), (-1,-1), "TOP"),
("ALIGN", (0,0), (0,-1), "CENTER"),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 5),
("RIGHTPADDING", (0,0), (-1,-1), 4),
("GRID", (0,0), (-1,-1), 0.4, colors.HexColor("#b0bec5")),
("LINEBELOW", (0,0), (-1,-1), 0.8, colors.HexColor("#7986cb")),
])
)
story.append(t)
story.append(Spacer(1, 6*mm))
story.append(HRFlowable(width="100%", thickness=1, color=colors.HexColor("#78909c"), spaceBefore=2, spaceAfter=3))
story.append(Paragraph(
"📚 References: Murray's Medical Microbiology 9e Ch.67 (p.764-770) | "
"Jawetz, Melnick & Adelberg's Medical Microbiology 28e | "
"Sherris & Ryan's Medical Microbiology 8e",
FOOTER_STYLE
))
story.append(Paragraph(
"Army Medical College Bogura — Dept. of Microbiology | Parasitology (AMCB-06)",
FOOTER_STYLE
))
doc.build(story)
print(f"PDF created: {OUTPUT}")