I had this error on mPDF with printing. It is similar to yours,
PHP Warning: Declaration of mPDFWithLocalImages:($html) should be compatible with mPDF:($html, $sub = 0, $init = true, $close = true)
In PHP, when extending a base class with “extends,” to override a method, you name the method in your subclass (the one that extended the base), the same as the base/super class. The error is saying the functions formal signatures must match. In other words, this,
mPDFWithLocalImages:($html)
needed to be this,
mPDFWithLocalImages:($html, $sub = 0, $init = true, $close = true)