In this bio data remove all images and use this new image I have uploaded with changes I am writing down Remove July 2023 and remove () also and make it manmed na hovathi only and remove Mata pita bhai ni vigato and change it to family and change bhantar ni vigato to abhyas and remove whole nokri ni vigato and in adress write only Gandhinagar and make this simple in one lines not in separate side to side details written Prepare me new biodata
cd /home/daytona/workspace/attachments/9bcf5a57-13eb-4d58-a1b1-217bc1502f1f/ && python3 -c " import pdfplumber with pdfplumber.open('kamini_biodata_.pdf') as pdf: for i, page in enumerate(pdf.pages): print(f'=== PAGE {i+1} ===') print(page.extract_text()) "
mkdir -p /home/daytona/workspace/kamini-biodata && curl -s -o /home/daytona/workspace/kamini-biodata/photo.jpg "https://d361swluvexzqs.cloudfront.net/chats-attachments/Use-AI-Image-Jun-4-2026-12_35_43-1780558010000-4dguub.png" && echo "Photo downloaded: $(ls -lh /home/daytona/workspace/kamini-biodata/photo.jpg)"
~/kamini-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, Table, TableStyle, Paragraph, Spacer, 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
from reportlab.platypus import KeepTogether
import os
from PIL import Image as PILImage
# Register Gujarati font
font_paths = [
"/usr/share/fonts/truetype/noto/NotoSansGujarati-Regular.ttf",
"/usr/share/fonts/truetype/noto/NotoSansGujarati[wdth,wght].ttf",
]
gujarati_font = "Helvetica"
for fp in font_paths:
if os.path.exists(fp):
try:
pdfmetrics.registerFont(TTFont("Gujarati", fp))
gujarati_font = "Gujarati"
print(f"Registered font: {fp}")
break
except Exception as e:
print(f"Font error: {e}")
# Also try Google Noto fonts
if gujarati_font == "Helvetica":
import subprocess
result = subprocess.run(["find", "/usr/share/fonts", "-name", "*ujarati*", "-o", "-name", "*ujarat*"],
capture_output=True, text=True)
print("Available Gujarati fonts:", result.stdout)
result2 = subprocess.run(["find", "/usr/share/fonts", "-name", "*.ttf"], capture_output=True, text=True)
print("All TTF fonts:", result2.stdout[:2000])
print(f"Using font: {gujarati_font}")
output_path = "/home/daytona/workspace/kamini-biodata/kamini_biodata_new.pdf"
photo_path = "/home/daytona/workspace/kamini-biodata/photo.jpg"
# Crop photo to portrait/square for biodata
img = PILImage.open(photo_path)
w, h = img.size
# Crop to roughly 3:4 portrait from center
target_ratio = 3/4
current_ratio = w/h
if current_ratio > target_ratio:
new_w = int(h * target_ratio)
left = (w - new_w) // 2
img = img.crop((left, 0, left + new_w, h))
else:
new_h = int(w / target_ratio)
top = 0
img = img.crop((0, top, w, top + new_h))
cropped_path = "/home/daytona/workspace/kamini-biodata/photo_cropped.jpg"
img.save(cropped_path, "JPEG", quality=95)
print(f"Cropped photo saved: {cropped_path}")
python3 /home/daytona/workspace/kamini-biodata/create_biodata.py
pip install --quiet --user fonttools && \ pip install --quiet --user babelstone && \ curl -sL "https://github.com/googlefonts/noto-fonts/raw/main/hinted/ttf/NotoSansGujarati/NotoSansGujarati-Regular.ttf" \ -o /home/daytona/workspace/kamini-biodata/NotoSansGujarati-Regular.ttf && \ ls -lh /home/daytona/workspace/kamini-biodata/NotoSansGujarati-Regular.ttf
ls -lh /home/daytona/workspace/kamini-biodata/NotoSansGujarati-Regular.ttf 2>/dev/null && echo "Font exists" || echo "Font missing"
~/kamini-biodata/build_biodata.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.units import cm, mm
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from PIL import Image as PILImage
import os
# Register Gujarati font
font_path = "/home/daytona/workspace/kamini-biodata/NotoSansGujarati-Regular.ttf"
pdfmetrics.registerFont(TTFont("Gujarati", font_path))
# Also try bold variant (use same font for bold fallback)
pdfmetrics.registerFont(TTFont("GujaratiBold", font_path))
output_path = "/home/daytona/workspace/kamini-biodata/kamini_biodata_new.pdf"
photo_path = "/home/daytona/workspace/kamini-biodata/photo_cropped.jpg"
W, H = A4 # 595.27 x 841.89 points
# Colors
GOLD = colors.HexColor("#C8860A")
DARK_GOLD = colors.HexColor("#8B5E0A")
CREAM = colors.HexColor("#FDF8F0")
LIGHT_GOLD = colors.HexColor("#F5E6C8")
WHITE = colors.white
DARK = colors.HexColor("#2C1A00")
MEDIUM = colors.HexColor("#5C3D00")
c = canvas.Canvas(output_path, pagesize=A4)
# ─── BACKGROUND ─────────────────────────────────────────────────────────────
c.setFillColor(CREAM)
c.rect(0, 0, W, H, fill=1, stroke=0)
# Decorative border - outer
c.setStrokeColor(GOLD)
c.setLineWidth(3)
c.rect(12, 12, W-24, H-24, fill=0, stroke=1)
# Decorative border - inner thin
c.setStrokeColor(DARK_GOLD)
c.setLineWidth(0.8)
c.rect(18, 18, W-36, H-36, fill=0, stroke=1)
# ─── TOP HEADER BAND ────────────────────────────────────────────────────────
header_h = 95
c.setFillColor(GOLD)
c.rect(18, H-18-header_h, W-36, header_h, fill=1, stroke=0)
# Decorative lines in header
c.setStrokeColor(WHITE)
c.setLineWidth(0.5)
c.line(25, H-18-8, W-25, H-18-8)
c.line(25, H-18-header_h+8, W-25, H-18-header_h+8)
# Main title - Gujarati
c.setFillColor(WHITE)
c.setFont("Gujarati", 26)
c.drawCentredString(W/2, H-18-52, "કામિની કનુભાઈ વાલેરા")
# Subtitle line
c.setFont("Gujarati", 12)
c.drawCentredString(W/2, H-18-72, "હિન્દુ વણકર | ગાંધીનગર")
# ─── PHOTO ──────────────────────────────────────────────────────────────────
photo_w = 105
photo_h = 130
photo_x = W - 18 - 22 - photo_w # right side with margin
photo_y = H - 18 - header_h - 18 - photo_h
# Gold border around photo
c.setStrokeColor(GOLD)
c.setLineWidth(2.5)
c.rect(photo_x - 4, photo_y - 4, photo_w + 8, photo_h + 8, fill=0, stroke=1)
# White inner mat
c.setFillColor(WHITE)
c.rect(photo_x - 2, photo_y - 2, photo_w + 4, photo_h + 4, fill=1, stroke=0)
# Draw photo
c.drawImage(photo_path, photo_x, photo_y, width=photo_w, height=photo_h, preserveAspectRatio=True, mask='auto')
# ─── CONTENT AREA ───────────────────────────────────────────────────────────
content_x = 35
content_right = photo_x - 15
line_h = 22
start_y = H - 18 - header_h - 30
# Helper functions
def section_header(c, text, y):
"""Draw a section header with gold background."""
c.setFillColor(LIGHT_GOLD)
c.rect(content_x - 5, y - 4, W - 36 - content_x + 5 + 18 - 3, 20, fill=1, stroke=0)
c.setStrokeColor(GOLD)
c.setLineWidth(1)
c.rect(content_x - 5, y - 4, W - 36 - content_x + 5 + 18 - 3, 20, fill=0, stroke=1)
c.setFillColor(DARK_GOLD)
c.setFont("GujaratiBold", 13)
c.drawString(content_x, y + 2, text)
return y - 24
def detail_row(c, label, value, y, full_width=False):
"""Draw label: value on one line."""
if full_width:
right_x = W - 36
else:
right_x = W - 40
c.setFillColor(MEDIUM)
c.setFont("GujaratiBold", 10.5)
c.drawString(content_x, y, label)
c.setFillColor(DARK)
c.setFont("Gujarati", 10.5)
# measure label width
label_w = c.stringWidth(label, "GujaratiBold", 10.5)
c.drawString(content_x + label_w + 4, y, value)
return y - line_h
def detail_row_inline(c, label, value, y, x_offset=0):
"""Draw on specific x."""
lx = content_x + x_offset
c.setFillColor(MEDIUM)
c.setFont("GujaratiBold", 10.5)
c.drawString(lx, y, label)
c.setFillColor(DARK)
c.setFont("Gujarati", 10.5)
label_w = c.stringWidth(label, "GujaratiBold", 10.5)
c.drawString(lx + label_w + 4, y, value)
# ─── PERSONAL DETAILS SECTION ───────────────────────────────────────────────
y = start_y
y = section_header(c, "વ્યક્તિગત વિગતો", y)
# Row 1
detail_row_inline(c, "નામ :", "કામિની કનુભાઈ વાલેરા", y)
y -= line_h
# Row 2
detail_row_inline(c, "જ્ઞાતિ :", "SC વણકર", y)
y -= line_h
# Row 3
detail_row_inline(c, "ધર્મ :", "હિન્દુ", y)
y -= line_h
# Row 4
detail_row_inline(c, "જન્મ તારીખ :", "૨૦/૦૬/૧૯૯૩", y)
y -= line_h
# Row 5
detail_row_inline(c, "જન્મ સ્થળ :", "ગાંધીનગર", y)
y -= line_h
# Row 6
detail_row_inline(c, "જન્મ સમય :", "રાત્રે ૯:૩૦ કલાકે", y)
y -= line_h
# Row 7
detail_row_inline(c, "ઊંચાઈ :", "૫ ફૂટ ૩ ઇંચ", y)
y -= line_h
# Row 8
detail_row_inline(c, "વજન :", "૬૦ કિલો", y)
y -= line_h
# Row 9
detail_row_inline(c, "દેખાવ :", "ગોરો", y)
y -= line_h
# Row 10
detail_row_inline(c, "ખોડ ખાંપણ :", "નથી", y)
y -= line_h
# Row 11 - manned na hovathi (removed July 2023 and brackets)
detail_row_inline(c, "છૂટાછેડા :", "મનમેળ ન હોવાથી", y)
y -= line_h
# Row 12
detail_row_inline(c, "ગામ :", "બોરીસણા (કડી)", y)
y -= line_h
# Row 13
detail_row_inline(c, "રહેઠાણ :", "ગાંધીનગર", y)
y -= line_h
# Row 14
detail_row_inline(c, "મોસાળ :", "વાવોલ, ગાંધીનગર – ૨૮૨", y)
y -= line_h
# Row 15
detail_row_inline(c, "પિતાનું મોસાળ :", "રાંધેજા", y)
y -= line_h
# Row 16
detail_row_inline(c, "માતાનું મોસાળ :", "વામજ", y)
y -= line_h
# Row 17
detail_row_inline(c, "પરગણું :", "૨૮૨", y)
y -= line_h
# Row 18 - hobby
detail_row_inline(c, "હોબી :", "સ્પર્ધાત્મક પરીક્ષાની તૈયારી", y)
y -= (line_h + 6)
# ─── ABHYAS (Education) SECTION ─────────────────────────────────────────────
y = section_header(c, "અભ્યાસ", y)
detail_row_inline(c, "નામ :", "કામિની કનુભાઈ વાલેરા", y)
y -= line_h
detail_row_inline(c, "ડિગ્રી :", "એમ.એ. (સંસ્કૃત)", y)
y -= (line_h + 6)
# ─── FAMILY SECTION ─────────────────────────────────────────────────────────
y = section_header(c, "Family", y)
detail_row_inline(c, "પિતાનું નામ :", "કનુભાઈ સવજીભાઈ વાલેરા", y)
y -= line_h
detail_row_inline(c, "પિતાનો વ્યવસાય :", "ધંધો", y)
y -= line_h
detail_row_inline(c, "માતાનું નામ :", "રમીલાબેન કનુભાઈ વાલેરા", y)
y -= line_h
detail_row_inline(c, "માતાનો વ્યવસાય :", "સરકારી નોકરી", y)
y -= line_h
detail_row_inline(c, "ભાઈ :", "નાનો ભાઈ – MD Medicine ડૉક્ટર", y)
y -= (line_h + 6)
# ─── CONTACT SECTION ────────────────────────────────────────────────────────
y = section_header(c, "સંપર્ક વિગતો", y)
detail_row_inline(c, "ફોન નંબર :", "૯૯૯૮૩ ૧૪૬૭૧", y)
y -= line_h
detail_row_inline(c, "સરનામું :", "ગાંધીનગર", y)
y -= (line_h + 8)
# ─── EXPECTATION SECTION ────────────────────────────────────────────────────
y = section_header(c, "અપેક્ષા", y)
c.setFillColor(DARK)
c.setFont("Gujarati", 10.5)
c.drawString(content_x, y, "સરકારી નોકરી કરતા, સારો અભ્યાસ ધરાવતા.")
y -= line_h
# ─── BOTTOM FOOTER ──────────────────────────────────────────────────────────
footer_h = 30
c.setFillColor(GOLD)
c.rect(18, 18, W-36, footer_h, fill=1, stroke=0)
c.setFillColor(WHITE)
c.setFont("Gujarati", 10)
c.drawCentredString(W/2, 18 + 10, "કામિની કનુભાઈ વાલેરા | હિન્દુ વણકર | ગાંધીનગર | ૯૯૯૮૩ ૧૪૬૭૧")
c.save()
print(f"Biodata saved to: {output_path}")
print("Done!")
~/kamini-biodata/build_biodata.py
Successfully replaced 1 instance(s) of the string in '/home/daytona/workspace/kamini-biodata/build_biodata.py'
cat > /home/daytona/workspace/kamini-biodata/build_biodata.py << 'PYEOF' from reportlab.lib.pagesizes import A4 from reportlab.lib import colors from reportlab.lib.units import cm, mm from reportlab.pdfgen import canvas from reportlab.pdfbase import pdfmetrics from reportlab.pdfbase.ttfonts import TTFont from PIL import Image as PILImage import os pdfmetrics.registerFont(TTFont("Gujarati", "/home/daytona/workspace/kamini-biodata/NotoSansGujarati-Regular.ttf")) pdfmetrics.registerFont(TTFont("GujaratiBold", "/home/daytona/workspace/kamini-biodata/NotoSansGujarati-Regular.ttf")) output_path = "/home/daytona/workspace/kamini-biodata/kamini_biodata_new.pdf" photo_path = "/home/daytona/workspace/kamini-biodata/photo_cropped.jpg" W, H = A4 GOLD = colors.HexColor("#C8860A") DARK_GOLD = colors.HexColor("#8B5E0A") CREAM = colors.HexColor("#FDF8F0") LIGHT_GOLD = colors.HexColor("#FFF0C8") WHITE = colors.white DARK = colors.HexColor("#2C1A00") MEDIUM = colors.HexColor("#5C3D00") c = canvas.Canvas(output_path, pagesize=A4) # Background c.setFillColor(CREAM) c.rect(0, 0, W, H, fill=1, stroke=0) # Outer gold border c.setStrokeColor(GOLD) c.setLineWidth(3) c.rect(12, 12, W-24, H-24, fill=0, stroke=1) # Inner thin border c.setStrokeColor(DARK_GOLD) c.setLineWidth(0.8) c.rect(18, 18, W-36, H-36, fill=0, stroke=1) # Header band header_h = 90 c.setFillColor(GOLD) c.rect(18, H-18-header_h, W-36, header_h, fill=1, stroke=0) # Decorative lines in header c.setStrokeColor(WHITE) c.setLineWidth(0.5) c.line(30, H-18-10, W-30, H-18-10) c.line(30, H-18-header_h+10, W-30, H-18-header_h+10) # Header title c.setFillColor(WHITE) c.setFont("Gujarati", 26) c.drawCentredString(W/2, H-18-50, "\u0a95\u0abe\u0aae\u0abf\u0aa8\u0ac0 \u0a95\u0aa8\u0ac1\u0aad\u0abe\u0a88 \u0ab5\u0abe\u0ab2\u0ac7\u0ab0\u0abe") c.setFont("Gujarati", 11) c.drawCentredString(W/2, H-18-70, "\u0a39\u0abf\u0aa8\u0acd\u0aa6\u0ac1 \u0ab5\u0aa3\u0a95\u0ab0 | \u0a97\u0abe\u0a82\u0aa7\u0ac0\u0aa8\u0a97\u0ab0") # Photo photo_w = 105 photo_h = 128 photo_x = W - 38 - photo_w photo_y = H - 18 - header_h - 16 - photo_h c.setFillColor(WHITE) c.setStrokeColor(GOLD) c.setLineWidth(2.5) c.rect(photo_x - 4, photo_y - 4, photo_w + 8, photo_h + 8, fill=1, stroke=1) c.drawImage(photo_path, photo_x, photo_y, width=photo_w, height=photo_h, preserveAspectRatio=True, mask='auto') # Content layout content_x = 35 line_h = 20 y = H - 18 - header_h - 22 def section_header(c, text, y): bw = W - 36 - 18 + 3 c.setFillColor(LIGHT_GOLD) c.setStrokeColor(GOLD) c.setLineWidth(0.8) c.rect(content_x - 5, y - 3, bw, 18, fill=1, stroke=1) c.setFillColor(DARK_GOLD) c.setFont("GujaratiBold", 12) c.drawString(content_x, y + 2, text) return y - 22 def row(c, label, value, y): c.setFillColor(MEDIUM) c.setFont("GujaratiBold", 10) c.drawString(content_x, y, label) lw = c.stringWidth(label, "GujaratiBold", 10) c.setFillColor(DARK) c.setFont("Gujarati", 10) c.drawString(content_x + lw + 3, y, value) return y - line_h # ── Personal Details ── y = section_header(c, "\u0ab5\u0acd\u0aaf\u0a95\u0acd\u0aa4\u0abf\u0a97\u0aa4 \u0ab5\u0abf\u0a97\u0aa4\u0acb", y) y = row(c, "\u0aa8\u0abe\u0aae :", "\u0a95\u0abe\u0aae\u0abf\u0aa8\u0ac0 \u0a95\u0aa8\u0ac1\u0aad\u0abe\u0a88 \u0ab5\u0abe\u0ab2\u0ac7\u0ab0\u0abe", y) y = row(c, "\u0a9c\u0acd\u0a9e\u0abe\u0aa4\u0abf :", "SC \u0ab5\u0aa3\u0a95\u0ab0", y) y = row(c, "\u0aa7\u0ab0\u0acd\u0aae :", "\u0a39\u0abf\u0aa8\u0acd\u0aa6\u0ac1", y) y = row(c, "\u0a9c\u0aa8\u0acd\u0aae \u0aa4\u0abe\u0ab0\u0ac0\u0a96 :", "\u0ae8\u0ae6/\u0ae6\u0ae6/\u0ae7\u0ae9\u0ae9\u0ae9", y) y = row(c, "\u0a9c\u0aa8\u0acd\u0aae \u0ab8\u0acd\u0aa5\u0ab3 :", "\u0a97\u0abe\u0a82\u0aa7\u0ac0\u0aa8\u0a97\u0ab0", y) y = row(c, "\u0a9c\u0aa8\u0acd\u0aae \u0ab8\u0aae\u0aaf :", "\u0ab0\u0abe\u0aa4\u0acd\u0ab0\u0ac7 \u0ae9:\u0ae9\u0ae6 \u0a95\u0ab2\u0abe\u0a95\u0ac7", y) y = row(c, "\u0a8a\u0a82\u0a9a\u0abe\u0a88 :", "\u0ae5 \u0aab\u0ac2\u0a9f \u0ae9 \u0a87\u0a82\u0a9a", y) y = row(c, "\u0ab5\u0a9c\u0aa8 :", "\u0ae0\u0ae6 \u0a95\u0abf\u0ab2\u0acb", y) y = row(c, "\u0aa6\u0ac7\u0a96\u0abe\u0ab5 :", "\u0a97\u0acb\u0ab0\u0acb", y) y = row(c, "\u0a96\u0acb\u0aa1 \u0a96\u0abe\u0a82\u0aaa\u0aa3 :", "\u0aa8\u0aa5\u0ac0", y) # Removed "July 2023" and brackets - only "manmed na hovathi" y = row(c, "\u0a9b\u0ac2\u0a9f\u0abe\u0a9b\u0ac7\u0aa1\u0abe :", "\u0aae\u0aa8\u0aae\u0ac7\u0ab3 \u0aa8 \u0a39\u0acb\u0ab5\u0abe\u0aa5\u0ac0", y) y = row(c, "\u0a97\u0abe\u0aae :", "\u0aac\u0acb\u0ab0\u0ac0\u0ab8\u0aa3\u0abe (\u0a95\u0aa1\u0ac0)", y) y = row(c, "\u0ab0\u0ab9\u0ac7\u0aa0\u0abe\u0aa3 :", "\u0a97\u0abe\u0a82\u0aa7\u0ac0\u0aa8\u0a97\u0ab0", y) y = row(c, "\u0aae\u0acb\u0ab8\u0abe\u0ab3 :", "\u0ab5\u0abe\u0ab5\u0acb\u0ab2, \u0a97\u0abe\u0a82\u0aa7\u0ac0\u0aa8\u0a97\u0ab0 \u2013 \u0ae8\u0ae8\u0ae8", y) y = row(c, "\u0aaa\u0abf\u0aa4\u0abe\u0aa8\u0ac1\u0a82 \u0aae\u0acb\u0ab8\u0abe\u0ab3 :", "\u0ab0\u0abe\u0a82\u0aa7\u0ac7\u0a9c\u0abe", y) y = row(c, "\u0aae\u0abe\u0aa4\u0abe\u0aa8\u0ac1\u0a82 \u0aae\u0acb\u0ab8\u0abe\u0ab3 :", "\u0ab5\u0abe\u0aae\u0a9c", y) y = row(c, "\u0aaa\u0ab0\u0a97\u0aa3\u0ac1\u0a82 :", "\u0ae8\u0ae8\u0ae8", y) y = row(c, "\u0a39\u0acb\u0aac\u0ac0 :", "\u0ab8\u0acd\u0aaa\u0ab0\u0acd\u0aa7\u0abe\u0aa4\u0acd\u0aae\u0a95 \u0aaa\u0ab0\u0ac0\u0a95\u0acd\u0ab7\u0abe\u0aa8\u0ac0 \u0aa4\u0ac8\u0aaf\u0abe\u0ab0\u0ac0", y) y -= 4 # ── Abhyas (Education) ── y = section_header(c, "\u0a85\u0aad\u0acd\u0aaf\u0abe\u0ab8", y) y = row(c, "\u0aa8\u0abe\u0aae :", "\u0a95\u0abe\u0aae\u0abf\u0aa8\u0ac0 \u0a95\u0aa8\u0ac1\u0aad\u0abe\u0a88 \u0ab5\u0abe\u0ab2\u0ac7\u0ab0\u0abe", y) y = row(c, "\u0aa1\u0abf\u0a97\u0acd\u0ab0\u0ac0 :", "\u0a8f\u0aae.\u0a8f. (\u0ab8\u0a82\u0ab8\u0acd\u0a95\u0ac3\u0aa4)", y) y -= 4 # ── Family ── y = section_header(c, "Family", y) y = row(c, "\u0aaa\u0abf\u0aa4\u0abe\u0aa8\u0ac1\u0a82 \u0aa8\u0abe\u0aae :", "\u0a95\u0aa8\u0ac1\u0aad\u0abe\u0a88 \u0ab8\u0ab5\u0a9c\u0ac0\u0aad\u0abe\u0a88 \u0ab5\u0abe\u0ab2\u0ac7\u0ab0\u0abe", y) y = row(c, "\u0aaa\u0abf\u0aa4\u0abe\u0aa8\u0acb \u0ab5\u0acd\u0aaf\u0ab5\u0ab8\u0abe\u0aaf :", "\u0aa7\u0a82\u0aa7\u0acb", y) y = row(c, "\u0aae\u0abe\u0aa4\u0abe\u0aa8\u0ac1\u0a82 \u0aa8\u0abe\u0aae :", "\u0ab0\u0aae\u0ac0\u0ab2\u0abe\u0aac\u0ac7\u0aa8 \u0a95\u0aa8\u0ac1\u0aad\u0abe\u0a88 \u0ab5\u0abe\u0ab2\u0ac7\u0ab0\u0abe", y) y = row(c, "\u0aae\u0abe\u0aa4\u0abe\u0aa8\u0acb \u0ab5\u0acd\u0aaf\u0ab5\u0ab8\u0abe\u0aaf :", "\u0ab8\u0ab0\u0a95\u0abe\u0ab0\u0ac0 \u0aa8\u0acb\u0a95\u0ab0\u0ac0", y) y = row(c, "\u0aad\u0abe\u0a88 :", "\u0aa8\u0abe\u0aa8\u0acb \u0aad\u0abe\u0a88 \u2013 MD Medicine \u0aa1\u0cca\u0a95\u0acd\u0a9f\u0ab0", y) y -= 4 # ── Contact ── y = section_header(c, "\u0ab8\u0a82\u0aaa\u0ab0\u0acd\u0a95 \u0ab5\u0abf\u0a97\u0aa4\u0acb", y) y = row(c, "\u0aab\u0acb\u0aa8 \u0aa8\u0a82\u0aac\u0ab0 :", "\u0ae9\u0ae9\u0ae9\u0ae8\u0ae9 \u0ae7\u0ae6\u0ae8\u0ae9\u0ae7", y) y = row(c, "\u0ab8\u0ab0\u0aa8\u0abe\u0aae\u0ac1\u0a82 :", "\u0a97\u0abe\u0a82\u0aa7\u0ac0\u0aa8\u0a97\u0ab0", y) y -= 4 # ── Expectation ── y = section_header(c, "\u0a85\u0aaa\u0ac7\u0a95\u0acd\u0ab7\u0abe", y) c.setFillColor(DARK) c.setFont("Gujarati", 10) c.drawString(content_x, y, "\u0ab8\u0ab0\u0a95\u0abe\u0ab0\u0ac0 \u0aa8\u0acb\u0a95\u0ab0\u0ac0 \u0a95\u0ab0\u0aa4\u0abe, \u0ab8\u0abe\u0ab0\u0acb \u0a85\u0aad\u0acd\u0aaf\u0abe\u0ab8 \u0aa7\u0ab0\u0abe\u0ab5\u0aa4\u0abe.") # Footer band footer_h = 28 c.setFillColor(GOLD) c.rect(18, 18, W-36, footer_h, fill=1, stroke=0) c.setFillColor(WHITE) c.setFont("Gujarati", 9.5) c.drawCentredString(W/2, 18 + 9, "\u0a95\u0abe\u0aae\u0abf\u0aa8\u0ac0 \u0a95\u0aa8\u0ac1\u0aad\u0abe\u0a88 \u0ab5\u0abe\u0ab2\u0ac7\u0ab0\u0abe | \u0a39\u0abf\u0aa8\u0acd\u0aa6\u0ac1 \u0ab5\u0aa3\u0a95\u0ab0 | \u0a97\u0abe\u0a82\u0aa7\u0ac0\u0aa8\u0a97\u0ab0 | \u0ae9\u0ae9\u0ae9\u0ae8\u0ae9 \u0ae7\u0ae6\u0ae8\u0ae9\u0ae7") c.save() print(f"Done: {output_path}") PYEOF echo "Script written"
python3 /home/daytona/workspace/kamini-biodata/build_biodata.py
python3 -c " import pdfplumber with pdfplumber.open('/home/daytona/workspace/kamini-biodata/kamini_biodata_new.pdf') as pdf: print(f'Pages: {len(pdf.pages)}') for p in pdf.pages: print(p.extract_text()) "
kamini biodata new
PDF Document · PDF
| Change | What was done |
|---|---|
| Photo | Replaced old images with your new uploaded photo |
| છૂટાછેડા | Changed to "મનમેળ ન હોવાથી" - removed "July 2023" and removed ( ) brackets |
| Nokri ni vigato | Entire section removed |
| Mata pita bhai section | Renamed to "Family" |
| Bhantar ni vigato | Renamed to "અભ્યાસ" |
| Address | Simplified to "ગાંધીનગર" only |
| Layout | All details written in simple one-line format (not side-by-side) |
| Design | Clean single-page biodata with gold border and header |
I can’t download ut
ls -lh /home/daytona/workspace/kamini-biodata/ && echo "---" && ls -lh /home/daytona/workspace/kamini-biodata/kamini_biodata_new.pdf
python3 -c " import subprocess # Convert PDF page to high-res PNG using pdftoppm result = subprocess.run( ['pdftoppm', '-r', '200', '-png', '/home/daytona/workspace/kamini-biodata/kamini_biodata_new.pdf', '/home/daytona/workspace/kamini-biodata/biodata_preview'], capture_output=True, text=True ) print('stdout:', result.stdout) print('stderr:', result.stderr) print('returncode:', result.returncode) import os files = os.listdir('/home/daytona/workspace/kamini-biodata/') print('Files:', [f for f in files if 'preview' in f or '.png' in f]) "
kamini biodata new
PDF Document · PDF
biodata preview 1
Image · PNG
I can’t download it png also
python3 -c " from PIL import Image img = Image.open('/home/daytona/workspace/kamini-biodata/biodata_preview-1.png') print('Size:', img.size) print('Mode:', img.mode) # Resize to smaller for embedding img_small = img.resize((800, int(800 * img.size[1]/img.size[0])), Image.LANCZOS) img_small.save('/home/daytona/workspace/kamini-biodata/biodata_small.jpg', 'JPEG', quality=88) print('Saved small version') import base64 with open('/home/daytona/workspace/kamini-biodata/biodata_small.jpg', 'rb') as f: data = base64.b64encode(f.read()).decode() print('Base64 length:', len(data)) # Save base64 to txt with open('/home/daytona/workspace/kamini-biodata/biodata_b64.txt', 'w') as f: f.write(data) print('Done') "
python3 -c " # Create an HTML file with the biodata embedded as base64 image # so user can open it and save from browser with open('/home/daytona/workspace/kamini-biodata/biodata_b64.txt', 'r') as f: b64 = f.read().strip() html = f'''<!DOCTYPE html> <html> <head><title>Kamini Biodata</title> <style>body{{margin:0;background:#222;display:flex;justify-content:center;align-items:center;min-height:100vh;}} img{{max-width:100%;box-shadow:0 4px 20px #000;}}</style> </head> <body> <img src=\"data:image/jpeg;base64,{b64}\" alt=\"Kamini Biodata\" /> </body> </html>''' with open('/home/daytona/workspace/kamini-biodata/biodata_view.html', 'w') as f: f.write(html) print('HTML file size:', len(html), 'bytes') print('Saved to: /home/daytona/workspace/kamini-biodata/biodata_view.html') "
Give me a pdf
ls -lh /home/daytona/workspace/kamini-biodata/kamini_biodata_new.pdf && python3 -c " import base64 with open('/home/daytona/workspace/kamini-biodata/kamini_biodata_new.pdf', 'rb') as f: data = base64.b64encode(f.read()).decode() # Save as downloadable HTML with embedded PDF html = '''<!DOCTYPE html> <html> <head><title>Download Biodata</title></head> <body> <script> var b64 = \"''' + data + '''\"; var binary = atob(b64); var bytes = new Uint8Array(binary.length); for(var i=0;i<binary.length;i++) bytes[i]=binary.charCodeAt(i); var blob = new Blob([bytes], {type: 'application/pdf'}); var a = document.createElement('a'); a.href = URL.createObjectURL(blob); a.download = 'kamini_biodata.pdf'; document.body.appendChild(a); a.click(); </script> <p>If download does not start, <a id='dl'>click here</a></p> <embed src=\"data:application/pdf;base64,''' + data + '''\" width=\"100%\" height=\"900px\" /> </body> </html>''' with open('/home/daytona/workspace/kamini-biodata/download_biodata.html', 'w') as f: f.write(html) print('HTML saved, size:', len(html)) "
kamini biodata new
PDF Document · PDF
download biodata
HTML File · HTML
biodata small
Image · JPG