mPDF Manual – mPDF functions

FPDF Original Functions

mPDF is based on FDPF and has developed to support HTML input. However you can still use the original functions to write directly to the document. The links below take you straight to the FPDF Reference Manual pages:

Cell - print a cell*

Image - output an image

Line - draw a line

MultiCell - print text with line breaks*

Rect - draw a rectangle

SetDrawColor - set drawing color

SetFillColor - set filling color

SetFont - set font

SetFontSize - set font size

SetLineWidth - set line width

SetTextColor - set text color

SetX - set current x position

SetXY - set current x and y positions

SetY - set current y position

Text - print a string

Write - print flowing text*

*Note that these functions require text to be encoded if required, and do not automatically reverse RTL text, or convert HTML entities to characters. See the mPDF functions WriteCell() and WriteText() which do much the same thing, but support UTF-8 input regardless of the output encoding of your PDF file.