Skip to content
Moncef Ajmani
  • Home
  • Projects
  • Archive
  • About
  • Topics
  • Hire me
Home Guides

Guides

Practical step-by-step guides for common development tasks. Each guide is tested and includes code examples.

All Advanced Beginner Intermediate
Beginner

Generate PDF Invoices in PHP with Dompdf and mPDF

Design invoices and contracts as HTML, export them as PDF with Dompdf, and switch to mPDF when you need right-to-left…

  1. 1 Install Dompdf
  2. 2 Design the invoice as HTML
  3. 3 Render the PDF
  4. 4 Stream or save the file
⏱ 30 minutes
Start Guide

Follow

  • GitHub

Write

  • RSS

More

  • Archive
  • About
  • Projects

Tools

  • Templates
  • Resources
  • Guides
© 2026 Moncef Ajmani. All rights reserved.
  • About
  • Contact
  • Privacy policy