from fpdf import FPDF
documents = {
"Business_Proposal.pdf": {
"title": "Proposal for Launching a New Eco-Friendly Packaging Line",
"content": (
"Executive Summary:\n"
"This proposal outlines a strategic plan to launch an eco-friendly
packaging line designed to meet the growing demand for sustainable packaging
solutions.\n\n"
"Market Analysis:\n"
"The global eco-friendly packaging market is expected to reach $250
billion by 2028. Our research indicates a significant opportunity to capture market
share by targeting health-conscious and environmentally aware consumers.\n\n"
"Solution Overview:\n"
"We propose the development of biodegradable, recyclable packaging made
from plant-based materials. The new line will focus on food and retail packaging
sectors.\n\n"
"Budget & Timeline:\n"
"Estimated budget: $1.2 million. Timeline: 6 months for R&D, 3 months
for production setup, and 3 months to market.\n\n"
"ROI Projections:\n"
"Expected ROI of 18% within the first year of launch, with scalable
growth potential."
)
},
"Short_Story.pdf": {
"title": "The Last Signal",
"content": (
"The Last Signal\n\n"
"Captain Elara drifted in orbit, the silence of space pressing against
her eardrums. It had been weeks since the accident, and mission control had gone
silent. Then, a crackle—a signal from deep space.\n\n"
"\"Help... us...\"\n\n"
"It wasn’t from Earth.\n\n"
"The voice spoke of an ancient civilization, buried beneath Titan’s
frozen crust. Elara now had a choice—return home, or follow the ghostly signal into
the unknown.\n\n"
"She turned the ship toward the source."
)
},
"Resume_Template.pdf": {
"title": "Professional Resume Template – Modern Style",
"content": (
"Name: ___________________________\n"
"Email: ___________________________\n"
"Phone: __________________________\n"
"LinkedIn: ________________________\n\n"
"Professional Summary:\n"
"A highly motivated and results-driven professional with expertise in
[Your Field]. Proven ability to manage projects, meet deadlines, and exceed
performance goals.\n\n"
"Experience:\n"
"Job Title | Company | Dates\n"
"- Key Responsibility 1\n"
"- Key Responsibility 2\n\n"
"Education:\n"
"Degree | School | Graduation Year\n\n"
"Skills:\n"
"- Skill 1\n"
"- Skill 2\n"
"- Skill 3"
)
},
"Math_Worksheet.pdf": {
"title": "Grade 6 Math Practice – Fractions and Decimals",
"content": (
"Instructions: Solve the following problems. Show all your work.\n\n"
"1. 3/4 + 2/5 = _______\n"
"2. 7/8 - 1/3 = _______\n"
"3. Convert 0.75 to a fraction. _______\n"
"4. Multiply: 2/3 × 4/5 = _______\n"
"5. Divide: 3/4 ÷ 1/2 = _______\n\n"
"Answer Key:\n"
"1. 23/20 or 1 3/20\n"
"2. 13/24\n"
"3. 3/4\n"
"4. 8/15\n"
"5. 1.5 or 3/2"
)
},
"Technical_Report.pdf": {
"title": "Machine Learning in Fraud Detection – An Overview",
"content": (
"Introduction:\n"
"This report examines the application of machine learning (ML)
algorithms in detecting fraudulent financial transactions.\n\n"
"Methodology:\n"
"We used datasets of transactional records and applied algorithms such
as logistic regression, random forest, and neural networks.\n\n"
"Case Studies:\n"
"Three financial institutions implemented ML and saw fraud detection
rates increase by 30%.\n\n"
"Tools Comparison:\n"
"TensorFlow and Scikit-learn were evaluated. TensorFlow offered better
scalability, while Scikit-learn was easier for rapid prototyping.\n\n"
"Performance Metrics:\n"
"Key metrics included precision, recall, and F1-score. Neural networks
achieved the highest F1-score of 0.92.\n\n"
"Conclusion:\n"
"ML significantly enhances fraud detection capabilities, reducing false
positives and enabling real-time prevention."
)
}
}
def create_pdf(filename, title, content):
pdf = FPDF()
pdf.add_page()
pdf.set_font("Arial", 'B', 16)
pdf.cell(200, 10, txt=title, ln=True, align='C')
pdf.ln(10)
pdf.set_font("Arial", '', 12)
for line in content.split('\n'):
pdf.multi_cell(0, 10, line)
pdf.output(filename)
for filename, doc in documents.items():
create_pdf(filename, doc["title"], doc["content"])
print(f"Created {filename}")