Abhijeet majhi 2054-03-21 29 5’5” Hindu Sudi Nepalese Hindi maithili english nepali Kathmandu maharajgunj current address Rajbiraj saptari Mbbs Doctor Manoj kumar majhi - journalist Anita majhi- homemaker 2 elder sister both married Non vegetarian Cooking, dancing social activist
mkdir -p /home/daytona/workspace/biodata && curl -s -o /home/daytona/workspace/b…
~/biodata/create_biodata.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.platypus import (
SimpleDocTemplate, Paragraph, Spacer, Table, TableStyle, Image, HRFlowable
)
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER, TA_LEFT, TA_RIGHT
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
import os
OUTPUT = "/home/daytona/workspace/biodata/Abhijeet_Majhi_Biodata.pdf"
PHOTO = "/home/daytona/workspace/biodata/photo.jpeg"
# Color palette
DARK_MAROON = colors.HexColor("#6B1A2B")
LIGHT_GOLD = colors.HexColor("#F5E6C8")
CREAM = colors.HexColor("#FFFAF3")
MEDIUM_MAROON = colors.HexColor("#8B2535")
TEXT_DARK = colors.HexColor("#2C1A1A")
DIVIDER = colors.HexColor("#C4A35A")
doc = SimpleDocTemplate(
OUTPUT,
pagesize=A4,
rightMargin=1.8*cm,
leftMargin=1.8*cm,
topMargin=1.5*cm,
bottomMargin=1.5*cm,
)
W, H = A4
styles = getSampleStyleSheet()
# Custom styles
title_style = ParagraphStyle(
"Title",
fontSize=26,
fontName="Helvetica-Bold",
textColor=DARK_MAROON,
alignment=TA_CENTER,
spaceAfter=2,
spaceBefore=0,
leading=30,
)
subtitle_style = ParagraphStyle(
"Subtitle",
fontSize=11,
fontName="Helvetica",
textColor=MEDIUM_MAROON,
alignment=TA_CENTER,
spaceAfter=4,
leading=14,
)
section_heading = ParagraphStyle(
"SectionHeading",
fontSize=11,
fontName="Helvetica-Bold",
textColor=colors.white,
alignment=TA_LEFT,
spaceAfter=0,
spaceBefore=0,
leftIndent=6,
leading=14,
)
label_style = ParagraphStyle(
"Label",
fontSize=9.5,
fontName="Helvetica-Bold",
textColor=DARK_MAROON,
alignment=TA_LEFT,
leading=13,
)
value_style = ParagraphStyle(
"Value",
fontSize=9.5,
fontName="Helvetica",
textColor=TEXT_DARK,
alignment=TA_LEFT,
leading=13,
)
footer_style = ParagraphStyle(
"Footer",
fontSize=8,
fontName="Helvetica-Oblique",
textColor=MEDIUM_MAROON,
alignment=TA_CENTER,
leading=10,
)
def section_header(text):
"""Returns a full-width colored bar with section title."""
heading = Paragraph(text.upper(), section_heading)
t = Table([[heading]], colWidths=[doc.width])
t.setStyle(TableStyle([
("BACKGROUND", (0,0), (-1,-1), DARK_MAROON),
("TOPPADDING", (0,0), (-1,-1), 5),
("BOTTOMPADDING", (0,0), (-1,-1), 5),
("LEFTPADDING", (0,0), (-1,-1), 8),
("RIGHTPADDING", (0,0), (-1,-1), 8),
]))
return t
def info_row(label, value):
return [Paragraph(label, label_style), Paragraph(str(value), value_style)]
def info_table(rows, col1=5.5*cm, col2=None):
if col2 is None:
col2 = doc.width - col1
t = Table(rows, colWidths=[col1, col2])
t.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "TOP"),
("TOPPADDING", (0,0), (-1,-1), 4),
("BOTTOMPADDING", (0,0), (-1,-1), 4),
("LEFTPADDING", (0,0), (-1,-1), 6),
("RIGHTPADDING", (0,0), (-1,-1), 6),
("ROWBACKGROUNDS",(0,0), (-1,-1), [CREAM, LIGHT_GOLD]),
("LINEBELOW", (0,0), (-1,-1), 0.3, colors.HexColor("#DDD0B3")),
]))
return t
# ── Build story ──────────────────────────────────────────────────────────────
story = []
# ── HEADER: Photo + Name block side by side ──
photo_img = Image(PHOTO, width=4.2*cm, height=5.0*cm)
photo_img.hAlign = "CENTER"
name_block = [
Paragraph("Abhijeet Majhi", title_style),
Paragraph("MBBS | Doctor", subtitle_style),
Spacer(1, 4),
HRFlowable(width="100%", thickness=1.5, color=DIVIDER, spaceAfter=4),
Paragraph("✦ Matrimonial Biodata ✦", subtitle_style),
]
header_table = Table(
[[photo_img, name_block]],
colWidths=[4.8*cm, doc.width - 4.8*cm],
)
header_table.setStyle(TableStyle([
("VALIGN", (0,0), (-1,-1), "MIDDLE"),
("LEFTPADDING", (0,0), (0,-1), 0),
("RIGHTPADDING", (0,0), (0,-1), 14),
("LEFTPADDING", (1,0), (1,-1), 6),
("BACKGROUND", (0,0), (-1,-1), LIGHT_GOLD),
("ROUNDEDCORNERS",(0,0), (-1,-1), 6),
("BOX", (0,0), (-1,-1), 1.5, DIVIDER),
("TOPPADDING", (0,0), (-1,-1), 10),
("BOTTOMPADDING", (0,0), (-1,-1), 10),
]))
story.append(header_table)
story.append(Spacer(1, 10))
# ── PERSONAL DETAILS ──
story.append(section_header("Personal Details"))
story.append(Spacer(1, 2))
personal_rows = [
info_row("Date of Birth", "21 March 2054 (B.S.)"),
info_row("Age", "29 Years"),
info_row("Height", "5 ft 5 in"),
info_row("Religion", "Hindu"),
info_row("Caste / Gotra", "Sudi"),
info_row("Nationality", "Nepalese"),
info_row("Languages Known", "Hindi, Maithili, English, Nepali"),
]
story.append(info_table(personal_rows))
story.append(Spacer(1, 8))
# ── ADDRESS ──
story.append(section_header("Address"))
story.append(Spacer(1, 2))
address_rows = [
info_row("Current Address", "Maharajgunj, Kathmandu, Nepal"),
info_row("Permanent Address","Rajbiraj, Saptari, Nepal"),
]
story.append(info_table(address_rows))
story.append(Spacer(1, 8))
# ── EDUCATION & PROFESSION ──
story.append(section_header("Education & Profession"))
story.append(Spacer(1, 2))
edu_rows = [
info_row("Qualification", "MBBS"),
info_row("Profession", "Doctor"),
]
story.append(info_table(edu_rows))
story.append(Spacer(1, 8))
# ── FAMILY DETAILS ──
story.append(section_header("Family Details"))
story.append(Spacer(1, 2))
family_rows = [
info_row("Father's Name", "Manoj Kumar Majhi"),
info_row("Father's Occupation", "Journalist"),
info_row("Mother's Name", "Anita Majhi"),
info_row("Mother's Occupation", "Homemaker"),
info_row("Siblings", "2 Elder Sisters (Both Married)"),
]
story.append(info_table(family_rows))
story.append(Spacer(1, 8))
# ── LIFESTYLE & INTERESTS ──
story.append(section_header("Lifestyle & Interests"))
story.append(Spacer(1, 2))
life_rows = [
info_row("Diet", "Non-Vegetarian"),
info_row("Hobbies", "Cooking, Dancing, Social Activism"),
]
story.append(info_table(life_rows))
story.append(Spacer(1, 16))
# ── FOOTER ──
story.append(HRFlowable(width="100%", thickness=1, color=DIVIDER, spaceAfter=4))
story.append(Paragraph(
"This biodata has been prepared for matrimonial purposes only. All information provided is true to the best of our knowledge.",
footer_style
))
doc.build(story)
print(f"PDF created: {OUTPUT}")
python /home/daytona/workspace/biodata/create_biodata.py
ls -lh /home/daytona/workspace/biodata/Abhijeet_Majhi_Biodata.pdf
Abhijeet Majhi Biodata
PDF Document · PDF
Add a photo
curl -s -o /home/daytona/workspace/biodata/photo.jpeg "https://d361swluvexzqs.cl…
Abhijeet Majhi Biodata
PDF Document · PDF
Can’t download
python3 -c "import subprocess; result = subprocess.run(['pdftoppm', '-r', '150',…
python3 -c " from PIL import Image img = Image.open('/home/daytona/workspace/bio…
python3 -c " import base64 with open('/home/daytona/workspace/biodata/biodata_pa…
A clean matrimonial biodata card for Abhijeet Majhi. The design has a warm maroon and gold color scheme. At the top, a header section with a passport-style photo of a young Indian/Nepalese man with glasses and a beard wearing a grey coat on the left side, and his name "Abhijeet Majhi" in large elegant maroon text on the right, with subtitle "MBBS | Doctor" and "Matrimonial Biodata" below. Then neatly organized sections with colored maroon section headers: Personal Details (DOB: 21 March 2054 BS, Age: 29, Height: 5'5", Religion: Hindu, Caste: Sudi, Nationality: Nepalese, Languages: Hindi, Maithili, English, Nepali), Address (Current: Maharajgunj Kathmandu; Permanent: Rajbiraj Saptari), Education and Profession (MBBS, Doctor), Family Details (Father: Manoj Kumar Majhi - Journalist; Mother: Anita Majhi - Homemaker; Siblings: 2 Elder Sisters both married), Lifestyle and Interests (Diet: Non-Vegetarian; Hobbies: Cooking, Dancing, Social Activism). Professional clean design on white/cream background with alternating row colors.

/home/daytona/workspace/biodata/Abhijeet_Majhi_Biodata.pdfEdit in this format and upload my details and photo accordingly
pdftoppm -r 150 -jpeg "/home/daytona/workspace/attachments/fd2b9ec3-c08a-43c9-a3…
python3 -c " import base64, json pages = [] for i in range(1, 5): with open…
python3 -c " import base64 for i in range(1, 5): with open(f'/home/daytona/w…
# Use pdfplumber to get detailed layout info including images, fonts, colors pyt…
python3 -c " import pdfplumber, fitz # PyMuPDF for image extraction pdf_path = …
python3 -c " from pypdf import PdfReader import zlib pdf_path = '/home/daytona/…
# Re-render the template pages at higher res so we can see the layout clearly pd…
# Get detailed text positions from all pages using pdfplumber python3 -c " impor…
~/biodata/create_abhijeet_template.py
"""
Recreate the biodata template with Abhijeet Majhi's details.
Strategy: Use the template page images as background, overlay new text + photo using reportlab canvas.
"""
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.utils import ImageReader
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from PIL import Image as PILImage
import io, os
W, H = A4 # 595 x 842 pt
OUTPUT = "/home/daytona/workspace/biodata/Abhijeet_Majhi_Biodata_Template.pdf"
PHOTO = "/home/daytona/workspace/biodata/photo.jpeg"
TPL = [
"/home/daytona/workspace/biodata/tpl-1.jpg",
"/home/daytona/workspace/biodata/tpl-2.jpg",
"/home/daytona/workspace/biodata/tpl-3.jpg",
"/home/daytona/workspace/biodata/tpl-4.jpg",
]
# ── Colors from template ──────────────────────────────────────────────────────
# Gold/amber used for name on page 1: rgb(251, 176, 59) ≈ #FBB03B
# White used for section headings
# Gold used for labels
GOLD = colors.HexColor("#FBB03B")
WHITE = colors.white
DARK = colors.HexColor("#1a1a1a") # near-black for values
# ── Font setup ────────────────────────────────────────────────────────────────
# Template uses PlayfairDisplay-Bold and Montserrat-SemiBold and Lora-Regular
# We'll use built-in reportlab fonts as fallback
# Try to register Google Fonts if available
import subprocess
def dl_font(name, url, path):
if not os.path.exists(path):
subprocess.run(["curl", "-sL", url, "-o", path], check=False)
return os.path.exists(path)
font_dir = "/home/daytona/workspace/biodata/fonts"
os.makedirs(font_dir, exist_ok=True)
# Download fonts
fonts_ok = {}
fonts_ok["Playfair"] = dl_font(
"Playfair",
"https://github.com/google/fonts/raw/main/ofl/playfairdisplay/PlayfairDisplay%5Bwght%5D.ttf",
f"{font_dir}/PlayfairDisplay.ttf"
)
fonts_ok["Montserrat"] = dl_font(
"Montserrat",
"https://github.com/google/fonts/raw/main/ofl/montserrat/Montserrat%5Bwght%5D.ttf",
f"{font_dir}/Montserrat.ttf"
)
fonts_ok["Lora"] = dl_font(
"Lora",
"https://github.com/google/fonts/raw/main/ofl/lora/Lora%5Bwght%5D.ttf",
f"{font_dir}/Lora.ttf"
)
print("Font downloads:", fonts_ok)
# Register fonts
for fname, fpath, reg_name in [
("Playfair", f"{font_dir}/PlayfairDisplay.ttf", "Playfair"),
("Montserrat", f"{font_dir}/Montserrat.ttf", "Montserrat"),
("Lora", f"{font_dir}/Lora.ttf", "Lora"),
]:
if fonts_ok.get(fname) and os.path.exists(fpath):
try:
pdfmetrics.registerFont(TTFont(reg_name, fpath))
print(f"Registered: {reg_name}")
except Exception as e:
print(f"Font registration failed {reg_name}: {e}")
fonts_ok[fname] = False
# Font fallbacks
F_TITLE = "Playfair" if fonts_ok.get("Playfair") else "Helvetica-Bold"
F_LABEL = "Montserrat" if fonts_ok.get("Montserrat") else "Helvetica-Bold"
F_VALUE = "Lora" if fonts_ok.get("Lora") else "Helvetica"
print(f"Using fonts: title={F_TITLE}, label={F_LABEL}, value={F_VALUE}")
# ── Helper: crop photo to circle using PIL, save as PNG ──────────────────────
def make_circle_photo(src, out_path, size=316):
img = PILImage.open(src).convert("RGBA")
# Crop to square from center
w, h = img.size
m = min(w, h)
left = (w - m) // 2
top = (h - m) // 3 # slightly from top for face-focus
img = img.crop((left, top, left+m, top+m))
img = img.resize((size, size), PILImage.LANCZOS)
# Create circular mask
mask = PILImage.new("L", (size, size), 0)
from PIL import ImageDraw
draw = ImageDraw.Draw(mask)
draw.ellipse((0, 0, size-1, size-1), fill=255)
# Apply mask
result = PILImage.new("RGBA", (size, size), (0, 0, 0, 0))
result.paste(img, (0, 0), mask)
result.save(out_path, "PNG")
print(f"Circle photo saved: {out_path}")
circle_photo = "/home/daytona/workspace/biodata/photo_circle.png"
make_circle_photo(PHOTO, circle_photo, size=400)
# ── Draw helpers ─────────────────────────────────────────────────────────────
def draw_bg(c, page_idx):
"""Draw the background template image for a page."""
c.drawImage(TPL[page_idx], 0, 0, width=W, height=H, preserveAspectRatio=False)
def draw_text(c, x, y, text, font, size, color, align="left"):
"""y is in PDF points from bottom. Template uses top-origin coords."""
c.setFont(font, size)
c.setFillColor(color)
if align == "center":
c.drawCentredString(x, y, text)
elif align == "right":
c.drawRightString(x, y, text)
else:
c.drawString(x, y, text)
def pt(top_y):
"""Convert top-origin y (pdfplumber) to bottom-origin y (reportlab)."""
return H - top_y
def draw_wrapped(c, x, y_top, text, font, size, color, max_width, line_height=18):
"""Draw text with manual wrapping. Returns final y_top after all lines."""
c.setFont(font, size)
c.setFillColor(color)
words = text.split()
line = ""
cy = y_top
for word in words:
test = (line + " " + word).strip()
if c.stringWidth(test, font, size) <= max_width:
line = test
else:
if line:
c.drawString(x, pt(cy), line)
cy += line_height
line = word
if line:
c.drawString(x, pt(cy), line)
cy += line_height
return cy
# ── Build PDF ─────────────────────────────────────────────────────────────────
c = canvas.Canvas(OUTPUT, pagesize=A4)
# ════════════════════════════════════════════════════════════
# PAGE 1 - Cover with Name and Photo
# ════════════════════════════════════════════════════════════
draw_bg(c, 0)
# Photo: original template has photo at x0=139.5, y0=201, x1=455.5, y1=517 (top-origin pdfplumber)
# That's center x=297.5, center y=359, width=316, height=316
photo_x = 139.5
photo_y_top = 201.0
photo_w = 316.0
photo_h = 316.0
# In reportlab (bottom-origin): y = H - y0 - h = 842 - 201 - 316 = 325
c.drawImage(
ImageReader(circle_photo),
photo_x, H - photo_y_top - photo_h,
width=photo_w, height=photo_h,
mask="auto"
)
# Name: original at x=135, top=686 → bottom = 842-686 = 156
# Original used PlayfairDisplay-Bold size 36, color gold
draw_text(c, W/2, pt(700), "ABHIJEET MAJHI", F_TITLE, 32, GOLD, align="center")
c.showPage()
# ════════════════════════════════════════════════════════════
# PAGE 2 - Personal Details
# ════════════════════════════════════════════════════════════
draw_bg(c, 1)
# Section heading: "Personal Details" at x=215, top=63 → bottom=779
draw_text(c, W/2, pt(63), "Personal Details", F_TITLE, 22, GOLD, align="center")
# Labels at x=120, values at x=336
# Row height ≈ 22pt
rows_personal = [
("Name:-", "Abhijeet Majhi"),
("Date Of Birth", "21 March 2054 (B.S.)"),
("Place Of Birth", "Rajbiraj, Saptari"),
("Caste", "Sudi"),
("Height", "5 ft 5 in"),
("Religion", "Hindu"),
("Nationality", "Nepalese"),
("Zodiac Sign", "—"),
("Languages Known", "Hindi, Maithili, English, Nepali"),
("Occupation", "Doctor (MBBS)"),
]
LX = 120 # label x
VX = 336 # value x
VW = W - VX - 20 # value max width
START_TOP = 96
ROW_H = 22
for i, (label, value) in enumerate(rows_personal):
row_top = START_TOP + i * ROW_H
draw_text(c, LX, pt(row_top), label, F_LABEL, 13, GOLD)
draw_text(c, VX, pt(row_top), value, F_VALUE, 13, WHITE)
c.showPage()
# ════════════════════════════════════════════════════════════
# PAGE 3 - Education + Family Details
# ════════════════════════════════════════════════════════════
draw_bg(c, 2)
# Education section
draw_text(c, LX, pt(51), "Education", F_LABEL, 13, GOLD)
edu_lines = [
"MBBS (Bachelor of Medicine & Surgery)",
]
for j, line in enumerate(edu_lines):
draw_text(c, VX, pt(51 + j*18), line, F_VALUE, 13, WHITE)
# Family Details heading at approx top=517
draw_text(c, W/2, pt(120), "Family Details", F_TITLE, 22, GOLD, align="center")
fam_rows = [
("Father's Name", "Manoj Kumar Majhi"),
("Father's Occupation", "Journalist"),
("Mother's Name", "Anita Majhi"),
("Mother's Occupation", "Homemaker"),
("Siblings", "2 Elder Sisters (Both Married)"),
]
FAM_START = 155
for i, (label, value) in enumerate(fam_rows):
row_top = FAM_START + i * ROW_H
draw_text(c, LX, pt(row_top), label, F_LABEL, 13, GOLD)
draw_text(c, VX, pt(row_top), value, F_VALUE, 13, WHITE)
c.showPage()
# ════════════════════════════════════════════════════════════
# PAGE 4 - Contact / Lifestyle Details
# ════════════════════════════════════════════════════════════
draw_bg(c, 3)
draw_text(c, W/2, pt(63), "Contact & Lifestyle Details", F_TITLE, 20, GOLD, align="center")
contact_rows = [
("Current Address", "Maharajgunj, Kathmandu, Nepal"),
("Permanent Address", "Rajbiraj, Saptari, Nepal"),
("Diet", "Non-Vegetarian"),
("Hobbies", "Cooking, Dancing, Social Activism"),
]
for i, (label, value) in enumerate(contact_rows):
row_top = 96 + i * ROW_H
draw_text(c, LX, pt(row_top), label, F_LABEL, 13, GOLD)
draw_text(c, VX, pt(row_top), value, F_VALUE, 13, WHITE)
c.showPage()
c.save()
print(f"PDF saved: {OUTPUT}")
print(f"Size: {os.path.getsize(OUTPUT)/1024:.0f} KB")
python3 /home/daytona/workspace/biodata/create_abhijeet_template.py 2>&1
pdftoppm -r 120 -jpeg "/home/daytona/workspace/biodata/Abhijeet_Majhi_Biodata_Te…
# Use PIL to check each page image size and get a quick preview thumbnail python…
# Fix page 3 layout - education is short (just MBBS), so push family details low…
~/biodata/create_abhijeet_template.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/biodata/create_abhijeet_template.py'
python3 /home/daytona/workspace/biodata/create_abhijeet_template.py 2>&1 && echo…
Abhijeet Majhi Biodata Template
PDF Document · PDF
Cant diwnlaod
pdftoppm -r 200 -jpeg "/home/daytona/workspace/biodata/Abhijeet_Majhi_Biodata_Te…
# Upload all 4 pages to a publicly accessible location via base64 encode for dis…
# Create a single combined image (all 4 pages stacked) for easy viewing/saving p…
final page 1
Image · JPG
final page 2
Image · JPG
final page 3
Image · JPG
final page 4
Image · JPG
biodata all pages
Image · JPG
Screenshot image
# Serve the images via a simple HTTP server temporarily, or encode them smaller …
biodata view
HTML File · HTML
Yes
A beautiful matrimonial biodata document page 1 (cover page). Dark navy/deep teal background with elegant gold floral corner decorations and ornamental borders. In the center, a circular portrait photo frame with a young Nepali/Indian man in his late 20s wearing round glasses, trimmed beard, grey overcoat over black sweater and white shirt. Below the circle photo frame, the name "ABHIJEET MAJHI" in large elegant gold serif font. Below that "MBBS | Doctor" in smaller gold text. Decorative gold divider line. At the bottom "Matrimonial Biodata" in elegant script gold font. Very elegant, professional, South Asian matrimonial style.
400, message: Got more than 4194304 bytes when reading: b'data: {"candidates": [{"content": {"role": "model","parts": [{"inlineData": {"mimeType": "image/png"...'.
We encountered an error while processing your request. Please try again or reach out to us for help.
Yes
Matrimonial biodata cover page for Abhijeet Majhi. Dark deep teal background with elegant gold floral corner ornaments and decorative border. Center: circular photo frame placeholder for a young man. Below the circle: name "ABHIJEET MAJHI" in large gold Playfair Display serif font. Subtitle "MBBS | Doctor" in gold. Thin gold ornamental divider. Bottom text "Matrimonial Biodata" in elegant gold italic script. Professional South Asian matrimonial style, luxurious feel.
Matrimonial biodata page 2 - Personal Details. Dark deep teal background with gold floral corner decorations and ornamental border. Section heading "Personal Details" in large gold serif font centered at top with gold underline ornament. Two-column layout with gold labels on left and white text values on right: "Name:-" / "Abhijeet Majhi", "Date Of Birth" / "21 March 2054 (B.S.)", "Place Of Birth" / "Rajbiraj, Saptari", "Caste" / "Sudi", "Height" / "5 ft 5 in", "Religion" / "Hindu", "Nationality" / "Nepalese", "Languages Known" / "Hindi, Maithili, English, Nepali", "Occupation" / "Doctor (MBBS)". Elegant South Asian matrimonial style.
400, message: Got more than 4194304 bytes when reading: b'data: {"candidates": [{"content": {"role": "model","parts": [{"inlineData": {"mimeType": "image/png"...'.
We encountered an error while processing your request. Please try again or reach out to us for help.