fork download
  1. from fpdf import FPDF
  2.  
  3. # Create instance of FPDF class
  4. pdf = FPDF('P', 'mm', 'A4')
  5. pdf.add_page()
  6. pdf.set_auto_page_break(auto=True, margin=10)
  7.  
  8. # Title
  9. pdf.set_font("Arial", 'B', 16)
  10. pdf.cell(0, 10, "Chess Training Program (1200 Level)", ln=True, align='C')
  11. pdf.set_font("Arial", '', 10)
  12. pdf.multi_cell(0, 5, "Dates: Feb 10 – Mar 19, 2026 | 1 Hour/Day | Goal: Confident & Tactically Sharp\nLocation: Print & use daily checklist\n\n---\n")
  13.  
  14. # Daily structure
  15. pdf.set_font("Arial", 'B', 12)
  16. pdf.cell(0, 6, "DAILY STRUCTURE (60 min)", ln=True)
  17. pdf.set_font("Arial", '', 10)
  18. pdf.multi_cell(0, 5, "- 20 min: Tactics\n- 15 min: Opening/Middlegame Theme\n- 15 min: Endgames\n- 10 min: Review / Notes / Visualization\n\n---\n")
  19.  
  20. # Weeks content
  21. weeks = {
  22. "WEEK 1 (Feb 10–16)": "Tactical Vision & Blunder Reduction\n- Tactics: Pins, skewers, hanging pieces, 1–2 move mates\n- Middlegame: Piece activity, develop all pieces, avoid repeated moves\n- Endgames: King activity, opposition, king + pawn basics\n- Notes: Record 1 mistake pattern daily",
  23. "WEEK 2 (Feb 17–23)": "Calculation & Simple Plans\n- Tactics: Forks, discovered attacks, mate in 2–3, removing defender\n- Openings: 1 main line as White, 1 defense vs e4/d4 (first 6–8 moves)\n- Endgames: Pawn majorities, passed pawns, when to trade\n- Notes: Write daily plan reflection",
  24. "WEEK 3 (Feb 24–Mar 1)": "Middlegame Stability\n- Tactics: Two-move combos, sacrifices on f7/f2, back-rank themes\n- Middlegame: Open files, weak squares, good vs bad bishops\n- Endgames: Rook + pawn vs rook basics, active rook principle\n- Bonus: 1 slow game + review",
  25. "WEEK 4 (Mar 2–8)": "Tournament Strength Play\n- Tactics: Mixed, including defensive threats\n- Openings: Model games, piece placement, pawn breaks\n- Endgames: Rook endgames, converting extra pawn\n- Mental: Sit 60 min, no distractions",
  26. "WEEK 5 (Mar 9–15)": "Conversion & Time Management\n- Tactics: Harder puzzles, accuracy > speed\n- Middlegame: When to simplify, trade advantageously\n- Endgames: Queen + pawn vs queen basics, king safety\n- Prep: Write moves neatly, check threats every move",
  27. "WEEK 6 (Mar 16–19)": "Sharp but Calm\n- Tactics: Easy-medium puzzles, confidence boosters\n- Openings: Review main lines only\n- Endgames: King + pawn basics, rook activity rules\n- Mental: Visualize sitting at board, calm under pressure",
  28. "DAY BEFORE TOURNAMENT (Mar 19)": "Light tactics only, review openings once, no blitz, sleep well"
  29. }
  30.  
  31. for week, content in weeks.items():
  32. pdf.set_font("Arial", 'B', 12)
  33. pdf.cell(0, 6, week, ln=True)
  34. pdf.set_font("Arial", '', 10)
  35. pdf.multi_cell(0, 5, content + "\n\n")
  36.  
  37. # Tournament tips
  38. pdf.set_font("Arial", 'B', 12)
  39. pdf.cell(0, 6, "TOURNAMENT TIPS FOR 1200", ln=True)
  40. pdf.set_font("Arial", '', 10)
  41. pdf.multi_cell(0, 5, "- Check checks, captures, threats each move\n- Play safe/simple moves if unsure\n- Don’t rush (increment exists)\n- Offer draw only in clear equality\n\n✅ Print and use daily checklist for progress tracking!")
  42.  
  43. # Save PDF
  44. pdf.output("Chess_Training_Program_1200.pdf")
Success #stdin #stdout 0.03s 25380KB
stdin
1
2
10
42
11
from fpdf import FPDF

# Create a new instance of the PDF class
pdf = FPDF()
pdf.add_page()
pdf.set_font("Arial", size=12)

# Company Information
pdf.cell(200, 10, "COMPANY NAME", ln=True, align='C')
pdf.cell(200, 10, "Company Address", ln=True, align='C')
pdf.cell(200, 10, "Phone: XXXXXXXXXX", ln=True, align='C')
pdf.ln(10)

# Employee Information
pdf.cell(100, 10, "Employee Name: Dipendra Dhakal", ln=True)
pdf.cell(100, 10, "Employee ID: 288550617", ln=True)
pdf.cell(100, 10, "Designation: Service Provider", ln=True)
pdf.cell(100, 10, "Month: June 2024", ln=True)
pdf.ln(10)

# Earnings
pdf.cell(100, 10, "Earnings:", ln=True)
pdf.cell(100, 10, "---------------------------", ln=True)
pdf.cell(100, 10, f"Service Provision: 2500.00 €", ln=True)
pdf.ln(5)
pdf.cell(100, 10, f"Gross Pay: 2500.00 €", ln=True)
pdf.ln(10)

# Deductions
pdf.cell(100, 10, "Deductions:", ln=True)
pdf.cell(100, 10, "---------------------------", ln=True)
pdf.cell(100, 10, f"IVA (23%): 575.00 €", ln=True)
pdf.cell(100, 10, f"IRS (11.5%): -287.50 €", ln=True)
pdf.cell(100, 10, f"Platform Usage Fee: -1.85 €", ln=True)
pdf.ln(5)
pdf.cell(100, 10, f"Total Deductions: 285.65 €", ln=True)
pdf.ln(10)

# Net Pay
pdf.cell(100, 10, f"Net Pay: 2214.35 €", ln=True)
pdf.ln(10)

# Footer
pdf.cell(100, 10, "Signature of Employer: ______________", ln=True)
pdf.cell(100, 10, "Date: 06 June 2024", ln=True)

# Save the PDF
pdf_output_path = "/mnt/data/Salary_Slip_Dipendra_Dhakal_2500.pdf"
pdf.output(pdf_output_path)

pdf_output_path
stdout
from fpdf import FPDF

# Create instance of FPDF class
pdf = FPDF('P', 'mm', 'A4')
pdf.add_page()
pdf.set_auto_page_break(auto=True, margin=10)

# Title
pdf.set_font("Arial", 'B', 16)
pdf.cell(0, 10, "Chess Training Program (1200 Level)", ln=True, align='C')
pdf.set_font("Arial", '', 10)
pdf.multi_cell(0, 5, "Dates: Feb 10 – Mar 19, 2026 | 1 Hour/Day | Goal: Confident & Tactically Sharp\nLocation: Print & use daily checklist\n\n---\n")

# Daily structure
pdf.set_font("Arial", 'B', 12)
pdf.cell(0, 6, "DAILY STRUCTURE (60 min)", ln=True)
pdf.set_font("Arial", '', 10)
pdf.multi_cell(0, 5, "- 20 min: Tactics\n- 15 min: Opening/Middlegame Theme\n- 15 min: Endgames\n- 10 min: Review / Notes / Visualization\n\n---\n")

# Weeks content
weeks = {
    "WEEK 1 (Feb 10–16)": "Tactical Vision & Blunder Reduction\n- Tactics: Pins, skewers, hanging pieces, 1–2 move mates\n- Middlegame: Piece activity, develop all pieces, avoid repeated moves\n- Endgames: King activity, opposition, king + pawn basics\n- Notes: Record 1 mistake pattern daily",
    "WEEK 2 (Feb 17–23)": "Calculation & Simple Plans\n- Tactics: Forks, discovered attacks, mate in 2–3, removing defender\n- Openings: 1 main line as White, 1 defense vs e4/d4 (first 6–8 moves)\n- Endgames: Pawn majorities, passed pawns, when to trade\n- Notes: Write daily plan reflection",
    "WEEK 3 (Feb 24–Mar 1)": "Middlegame Stability\n- Tactics: Two-move combos, sacrifices on f7/f2, back-rank themes\n- Middlegame: Open files, weak squares, good vs bad bishops\n- Endgames: Rook + pawn vs rook basics, active rook principle\n- Bonus: 1 slow game + review",
    "WEEK 4 (Mar 2–8)": "Tournament Strength Play\n- Tactics: Mixed, including defensive threats\n- Openings: Model games, piece placement, pawn breaks\n- Endgames: Rook endgames, converting extra pawn\n- Mental: Sit 60 min, no distractions",
    "WEEK 5 (Mar 9–15)": "Conversion & Time Management\n- Tactics: Harder puzzles, accuracy > speed\n- Middlegame: When to simplify, trade advantageously\n- Endgames: Queen + pawn vs queen basics, king safety\n- Prep: Write moves neatly, check threats every move",
    "WEEK 6 (Mar 16–19)": "Sharp but Calm\n- Tactics: Easy-medium puzzles, confidence boosters\n- Openings: Review main lines only\n- Endgames: King + pawn basics, rook activity rules\n- Mental: Visualize sitting at board, calm under pressure",
    "DAY BEFORE TOURNAMENT (Mar 19)": "Light tactics only, review openings once, no blitz, sleep well"
}

for week, content in weeks.items():
    pdf.set_font("Arial", 'B', 12)
    pdf.cell(0, 6, week, ln=True)
    pdf.set_font("Arial", '', 10)
    pdf.multi_cell(0, 5, content + "\n\n")

# Tournament tips
pdf.set_font("Arial", 'B', 12)
pdf.cell(0, 6, "TOURNAMENT TIPS FOR 1200", ln=True)
pdf.set_font("Arial", '', 10)
pdf.multi_cell(0, 5, "- Check checks, captures, threats each move\n- Play safe/simple moves if unsure\n- Don’t rush (increment exists)\n- Offer draw only in clear equality\n\n✅ Print and use daily checklist for progress tracking!")

# Save PDF
pdf.output("Chess_Training_Program_1200.pdf")