Skip to content
Advertisement

mPDF: How to use WriteCell function using bold text?

I’ve this snippet, in Laravel, where there is a wrapper. Note I’m using directly mPDF, instead of wrapper function

JavaScript

My need is simply to write my text in bold. I don’t ever need to change font file.

How ?!

Advertisement

Answer

I resolved accessing underlying FPDF functions.

Recap: Laravel-mpdf is a wrapper for mPDF. mPDF ‘wraps’ and enhance one of a few pdf handling libraries.

It’s stated here: https://mpdf.github.io/ : “It is based on FPDF and HTML2FPDF with a number of enhancements”

Having this info, I simply tried to use FPDF functions and they worked. FPDF docs: http://www.fpdf.org/en/doc

Snippet

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement