mPDF Manual – HTML control tags


(mPDF >= 4.3)

dottab – Insert dots to following (right-aligned) text


<dottab [ $outdent ] />

Insert a string of dots to fill the space to the text which follows <dottab />, which is right-aligned. This gives the appearance seen in e.g. a table of contents, or a menu with prices. A minimum of 3 dots (with spaces either side) is inserted. If the text which follows the <dottab /> will not fit on a single line, the default tab of ' ... ' is added, and text is not right-aligned.

From mPDF 5.7+ CSS styles can be applied to <dottab> as for an inline element.



Takes any valid CSS LENGTH  e.g. "2em"

Default: '0'


Version Description
4.3 This tag was added.
5.7 $outdent was added


Example #1


$menuitem = 'Chilli con carne <dottab />&amp;nbsp;£7.95';


Example #2

// To right-align the text which follows the <dottab> whilst indenting any preceding lines:

$menuitem = 'Chilli con carne etc. etc. <dottab outdent="3em" />&amp;nbsp;£7.95';

Fork me on GitHub