Guides › mPDF › Topic index

mPDF topic index

Find the mPDF function, setting, tag or placeholder you need, and jump to the guide that explains it with examples. The guides cover mPDF 8. If you followed a link to an old version 5 or 6 manual page, the matching topic below explains how the same thing works today.

ABCDEFHILMNOPRSTUW

A

AddPage()Start a new page from PHP
autoLangToFontChoose fonts per language
autoScriptToLangDetect scripts in mixed text

B

background-image-resizeScale background images
<barcode>Barcodes and QR codes
bcmath extensionNeeded by some barcode types
border-radiusRounded corners

C

<columns>Multi-column text
Composer installcomposer require mpdf/mpdf
CSS supportWhat the CSS engine handles

D

{DATE}Date placeholder
default_fontFont used when none is set
Destination::DOWNLOADForce a download
Destination::STRING_RETURNGet the PDF as a string
dir="rtl"Right-to-left text

E

Email attachmentPHPMailer and Symfony Mailer

F

Flexbox and gridNot supported: alternatives
fontDir and fontdataAdd your own fonts
formatPaper size
Form input to PDFValidate and escape user input

H

<htmlpagefooter>Named footers
<htmlpageheader>Named headers
HTML tagsSupported elements

I

imageVarsImages from memory
img_dpiDefault image resolution
Invoice templateComplete example

L

lang attributeMark the language of text
linear-gradient()Gradient backgrounds

M

margin_top / margin_bottomPage margins
memory_limitMemory errors
modeutf-8 or core fonts

N

{nbpg}Total pages

O

Output()Show, download, save or return

P

packTableDataBig tables in less memory
<pagebreak>Page breaks and orientation changes
page-break-insideKeep tables together
{PAGENO}Page number placeholder
PDFAArchival PDF/A output

R

RequirementsPHP version and extensions
resetpagenumRestart page numbering

S

SetAuthor()Document author
SetDirectionality()Right-to-left documents
SetFooter()Simple three-part footer
SetHTMLFooter()HTML footers
SetHTMLHeader()HTML headers
SetProtection()Passwords and permissions
SetTitle()Document title
showImageErrorsDebug missing images
shrink_tables_to_fitWide tables
simpleTablesFaster large tables
SVGVector images

T

tempDirWritable cache folder

U

useActiveFormsFillable form fields
use_kwtKeep headings with tables

W

WriteHTML()Writing in chunks

For the complete reference of every option, see the official documentation at mpdf.github.io.