Writing non-HTML text
mPDF is optimised to output HTML code, i.e. parsing the HTML markup. If you want to create a PDF file from a long text
file (e.g. a PHP script file) preserving TAB
s and multiple spaces, use the
function preparePreText().
Note this is not part of the mPDF class.
This will surround the text with <pre>
tags whilst preventing any <pre>
tags included in the text from
being parsed. It also allows use of a text string marker (<formfeed>
) to be replaced
by a formfeed in the output file.
See
- preparePreText()
- <formfeed> - Forces a new page, while keeping current HTML tags/CSS active