Can yoi check that all the spellings are correct in this
Can you rewrite the text with corrected formatting?
certificate of participation standard wording school certificate
Create a polished certificate layout ready to print
Choose the file format for the polished certificate.
~/
mkdir -p "/tmp/workspace/certificate-layout/src" "/tmp/workspace/certificate-layout/output" "/tmp/workspace/certificate-layout/assets" && python3 - <<'PY' from PIL import Image src='/tmp/workspace/attachments/ec71f618-e7c0-4497-a4f8-62dd47a7915d/d7b4e5d6-fc41-4482-87ea-f0fcd22bcc6f.jpg' im=Image.open(src) # Logo bounds from supplied proof im.crop((320,185,500,365)).save('/tmp/workspace/certificate-layout/assets/school_seal.png') print(im.size) PY
python3 - <<'PY' from pathlib import Path from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import landscape, A4 from reportlab.lib.colors import HexColor, white from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.utils import ImageReader from docx import Document from docx.shared import Inches, Pt, RGBColor from docx.enum.section import WD_ORIENT from docx.enum.text import WD_ALIGN_PARAGRAPH from docx.enum.table import WD_TABLE_ALIGNMENT, WD_CELL_VERTICAL_ALIGNMENT from docx.oxml import OxmlElement from docx.oxml.ns import qn base=Path('/tmp/workspace/certificate-layout') out=base/'output'; logo=base/'assets/school_seal.png' pdf=out/'Little_Rose_Convent_Certificate_of_Participation.pdf' docx_path=out/'Little_Rose_Convent_Certificate_of_Participation.docx' W,H=landscape(A4) purple=HexColor('#4F168B'); deep=HexColor('#28113D'); gold=HexColor('#D5A82F'); gray=HexColor('#444444') # PDF c=canvas.Canvas(str(pdf),pagesize=(W,H)); c.setTitle('Certificate of Participation - Little Rose Convent School') # outer frame c.setStrokeColor(deep); c.setLineWidth(1.3); c.rect(18,18,W-36,H-36,stroke=1,fill=0) c.setStrokeColor(gold); c.setLineWidth(0.8); c.rect(28,28,W-56,H-56,stroke=1,fill=0) # abstract corner ribbons c.setFillColor(purple); c.rect(18,H-116,160,98,fill=1,stroke=0); c.setFillColor(deep); c.saveState(); c.translate(90,H-18); c.rotate(-42); c.rect(0,-24,250,48,fill=1,stroke=0); c.restoreState() c.setFillColor(gold); c.saveState(); c.translate(29,H-58); c.rotate(-42); c.rect(0,-5,230,10,fill=1,stroke=0); c.restoreState() c.setFillColor(purple); c.saveState(); c.translate(W-70,20); c.rotate(42); c.rect(0,-34,220,68,fill=1,stroke=0); c.restoreState() c.setFillColor(deep); c.saveState(); c.translate(W-18,22); c.rotate(42); c.rect(0,-26,215,52,fill=1,stroke=0); c.restoreState() c.setFillColor(gold); c.saveState(); c.translate(W-26,37); c.rotate(42); c.rect(0,-4,190,8,fill=1,stroke=0); c.restoreState() # seal c.drawImage(ImageReader(str(logo)),58,H-150,width=94,height=94,mask='auto') # header c.setFillColor(gray); c.setFont('Helvetica',7.5); c.drawCentredString(W/2+95,H-47,'Affiliation No. 1731280 Affiliated to CBSE') c.setFillColor(purple); c.setFont('Helvetica-Bold',25); c.drawCentredString(W/2+85,H-80,'LITTLE ROSE CONVENT SCHOOL') c.setFillColor(gray); c.setFont('Helvetica-Bold',8); c.drawCentredString(W/2+85,H-97,'Lalgarh Jattan, Tehsil Sadulshahar, District Sri Ganganagar, Rajasthan') c.drawCentredString(W/2+85,H-109,'Mobile: 98877-93432, 96643-98114 | www.littlerosealgarh.com | littlerosealgarh19788@gmail.com') c.setStrokeColor(gold); c.setLineWidth(0.7); c.line(194,H-119,W-46,H-119) # session/title c.setFillColor(gray); c.setFont('Helvetica-Bold',11); c.drawCentredString(W/2,H-146,'SESSION: 20____ - 20____') c.setFillColor(HexColor('#8B251F')); c.setFont('Times-BoldItalic',27); c.drawCentredString(W/2,H-195,'Certificate of Participation') # body c.setFillColor(gray); c.setFont('Times-Roman',14) x=135; y=H-247 c.drawString(x,y,'This is to certify that') c.setStrokeColor(gray); c.setLineWidth(.7); c.line(288,y-3,655,y-3) c.setFont('Times-Italic',12); c.drawCentredString(472,y-17,'Name of Student') c.setFont('Times-Roman',14); y-=53 c.drawString(x,y,'of Class'); c.line(194,y-3,265,y-3); c.drawString(280,y,'has actively participated in'); c.line(462,y-3,681,y-3) c.setFont('Times-Italic',12); c.drawCentredString(571,y-17,'Name of Event / Activity') c.setFont('Times-Roman',14); y-=52 c.drawString(x,y,'held on'); c.line(190,y-3,365,y-3) c.setFont('Times-Italic',12); c.drawCentredString(277,y-17,'Date') # footer sign lines for x1,x2,label in [(72,214,'Activity Department'),(349,445,'Date'),(574,700,'Principal')]: c.setStrokeColor(gold); c.setLineWidth(.8); c.line(x1,67,x2,67); c.setFillColor(gray); c.setFont('Helvetica',11); c.drawCentredString((x1+x2)/2,48,label) c.save() # DOCX editable companion D=Document(); s=D.sections[0]; s.orientation=WD_ORIENT.LANDSCAPE; s.page_width=Inches(11.6929); s.page_height=Inches(8.2677); s.top_margin=Inches(.28); s.bottom_margin=Inches(.28); s.left_margin=Inches(.3); s.right_margin=Inches(.3) def border(cell,color='D5A82F',sz='10'): tcPr=cell._tc.get_or_add_tcPr(); borders=OxmlElement('w:tcBorders') for edge in ('top','left','bottom','right'): e=OxmlElement('w:'+edge); e.set(qn('w:val'),'single'); e.set(qn('w:sz'),sz); e.set(qn('w:color'),color); borders.append(e) tcPr.append(borders) def shade(cell,color): tcPr=cell._tc.get_or_add_tcPr(); shd=OxmlElement('w:shd'); shd.set(qn('w:fill'),color); tcPr.append(shd) def addp(text='',size=10,bold=False,color='000000',align=WD_ALIGN_PARAGRAPH.CENTER,italic=False,space=0): p=D.add_paragraph(); p.alignment=align; p.paragraph_format.space_after=Pt(space); p.paragraph_format.space_before=Pt(0) r=p.add_run(text); r.font.name='Arial'; r.font.size=Pt(size); r.bold=bold; r.italic=italic; r.font.color.rgb=RGBColor.from_string(color); return p # frame table T=D.add_table(rows=1,cols=1); T.alignment=WD_TABLE_ALIGNMENT.CENTER; cell=T.cell(0,0); border(cell,'4F168B','20'); cell.vertical_alignment=WD_CELL_VERTICAL_ALIGNMENT.CENTER # all content in a nested table within frame inner=cell.add_table(rows=1,cols=1); ic=inner.cell(0,0); border(ic,'D5A82F','8') # header head=ic.add_table(rows=1,cols=2); head.columns[0].width=Inches(1.45); head.columns[1].width=Inches(8.8) hc1,hc2=head.rows[0].cells; hc1.paragraphs[0].alignment=WD_ALIGN_PARAGRAPH.CENTER; hc1.paragraphs[0].add_run().add_picture(str(logo),width=Inches(.9)) p=hc2.paragraphs[0]; p.alignment=WD_ALIGN_PARAGRAPH.CENTER; r=p.add_run('LITTLE ROSE CONVENT SCHOOL'); r.bold=True;r.font.name='Arial';r.font.size=Pt(24);r.font.color.rgb=RGBColor(79,22,139) for text,size,bold in [('Affiliation No. 1731280 | Affiliated to CBSE',7,False),('Lalgarh Jattan, Tehsil Sadulshahar, District Sri Ganganagar, Rajasthan',8,True),('Mobile: 98877-93432, 96643-98114 | www.littlerosealgarh.com | littlerosealgarh19788@gmail.com',7,False)]: p=hc2.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;p.paragraph_format.space_after=Pt(0);r=p.add_run(text);r.font.name='Arial';r.font.size=Pt(size);r.bold=bold p=ic.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;p.paragraph_format.space_before=Pt(8);p.paragraph_format.space_after=Pt(4);r=p.add_run('SESSION: 20____ - 20____');r.bold=True;r.font.name='Arial';r.font.size=Pt(11) p=ic.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;p.paragraph_format.space_after=Pt(20);r=p.add_run('Certificate of Participation');r.bold=True;r.italic=True;r.font.name='Times New Roman';r.font.size=Pt(27);r.font.color.rgb=RGBColor(139,37,31) for text in ['This is to certify that ________________________________________________________________','of Class __________ has actively participated in ______________________________________________','held on ____________________________']: p=ic.add_paragraph();p.alignment=WD_ALIGN_PARAGRAPH.CENTER;p.paragraph_format.space_after=Pt(16);r=p.add_run(text);r.font.name='Times New Roman';r.font.size=Pt(14) # footer footer=ic.add_table(rows=1,cols=3); footer.alignment=WD_TABLE_ALIGNMENT.CENTER for cell2,label in zip(footer.rows[0].cells,['Activity Department','Date','Principal']): p=cell2.paragraphs[0];p.alignment=WD_ALIGN_PARAGRAPH.CENTER;p.paragraph_format.space_before=Pt(18);r=p.add_run('____________________\n'+label);r.font.name='Arial';r.font.size=Pt(10) D.save(str(docx_path)) print(pdf,docx_path) PY python3 - <<'PY' from pypdf import PdfReader from pathlib import Path p=Path('/tmp/workspace/certificate-layout/output/Little_Rose_Convent_Certificate_of_Participation.pdf') r=PdfReader(str(p)); print('PDF pages',len(r.pages),'size',r.pages[0].mediabox,'text:',r.pages[0].extract_text()[:200]) for f in Path('/tmp/workspace/certificate-layout/output').iterdir(): print(f.name,f.stat().st_size) PY
Little Rose Convent Certificate of Participation
PDF Document · PDF
Little Rose Convent Certificate of Participation
Word Document · DOCX