from fpdf import FPDF
# Create a PDF document
pdf = FPDF()
pdf.set_auto_page_break(auto=True, margin=15)
pdf.add_page()
# Set title
pdf.set_font("Arial", "B", 16)
pdf.cell(200, 10, txt="Directory of Ways to Make Money Online", ln=True, align="C")
pdf.ln(10)
# Set content
pdf.set_font("Arial", size=12)
content = [
    ("1. Freelancing Platforms", [
        "Upwork: Offer services like writing, graphic design, programming, etc.",
        "Fiverr: Create gigs for tasks such as video editing, voiceovers, design,
etc.",
        "Freelancer: A similar platform to Upwork where clients post projects for
bidding.",
        "Toptal: High-level freelancing for developers, designers, and finance
experts.",
    ]),
    ("2. Remote Work and Job Boards", [
        "We Work Remotely: Find remote job listings in various fields like
marketing, design, and programming.",
        "FlexJobs: A subscription-based service for vetted remote jobs.",
        "Remote OK: A job board specifically for remote work across a range of
industries.",
    ]),
    ("3. Selling Products or Services", [
        "Etsy: Sell handmade or vintage items, art, or craft supplies.",
        "Shopify: Build your own e-commerce store and sell physical or digital
products.",
        "Redbubble: Create and sell custom designs on products like shirts, mugs,
and phone cases.",
        "Amazon FBA: Fulfillment by Amazon allows you to sell products without
handling shipping and storage.",
    ]),
    ("4. Affiliate Marketing", [
        "Amazon Associates: Earn commissions by promoting Amazon products.",
        "ShareASale: A network where you can promote a wide variety of products.",
        "ClickBank: Promotes digital products and offers generous commissions.",
        "CJ Affiliate: Another affiliate network with many companies and products
to choose from.",
    ]),
    ("5. Teaching and Tutoring", [
        "Udemy: Create and sell online courses on a variety of subjects.",
        "Skillshare: Similar to Udemy, but with a focus on creative and business
skills.",
        "VIPKid: Teach English to children in China (requires experience and
qualifications).",
        "Teachable: Another platform to build and sell courses.",
    ]),
    ("6. Stock Photography and Content Creation", [
        "Shutterstock: Upload your photos, videos, or illustrations and earn
royalties when someone purchases them.",
        "Adobe Stock: Another platform for selling your digital content.",
        "YouTube: Monetize your videos via ads, sponsorships, and affiliate
marketing.",
        "Twitch: Live streaming platform where you can earn money through
donations, subscriptions, and sponsorships.",
    ]),
    ("7. Investing and Passive Income", [
        "Stocks & ETFs: Use platforms like Robinhood, Fidelity, or E*TRADE for
investing.",
        "Real Estate Crowdfunding: Platforms like Fundrise allow you to invest in
real estate projects with relatively small amounts of money.",
        "Peer-to-Peer Lending: Websites like LendingClub let you lend money to
individuals or businesses for a return.",
    ]),
    ("8. Survey & Microtasks", [
        "Swagbucks: Earn points for completing surveys, watching videos, and other
online tasks, which can be redeemed for gift cards or PayPal cash.",
        "InboxDollars: Similar to Swagbucks, offering rewards for surveys, watching
ads, and completing tasks.",
        "Amazon Mechanical Turk: Do small tasks for pay, such as data entry or
content moderation.",
    ]),
    ("9. Social Media and Influencer Marketing", [
        "Instagram: Promote products or services through posts and stories for
sponsorships.",
        "TikTok: Build an audience and collaborate with brands for paid
promotions.",
        "Twitter: Grow a large following and leverage sponsorships or promote
affiliate links.",
    ]),
    ("10. Blogging and Content Monetization", [
        "Medium: Get paid for writing articles that generate engagement.",
        "WordPress: Start a blog and monetize with ads (Google AdSense), affiliate
links, or sponsored posts.",
        "Substack: Start a newsletter and charge subscribers for premium content.",
    ]),
    ("11. Cryptocurrency and NFTs", [
        "Coinbase: Buy, sell, and trade cryptocurrency (be cautious as the market
can be volatile).",
        "OpenSea: Create and sell NFTs if you're into digital art or
collectibles.",
    ]),
]
# Loop through content to add to PDF
for title, items in content:
    pdf.set_font("Arial", "B", 12)
    pdf.cell(200, 10, txt=title, ln=True)
    pdf.set_font("Arial", size=12)
    for item in items:
        pdf.multi_cell(0, 10, txt=f" - {item}")
    pdf.ln(5)
# Save PDF to file
pdf.output("ways_to_make_money_online.pdf")