Got the same error. Replace the if(is_numeric($c)) block with a simple $c = intval($c); as recommended here https://github.com/deltaaskii/lara-pdf-merger/pull/45/files/ec44e3bf2ae9d47a27ff64ce310c5c7c15e5a4b2 That worked for me.
Got the same error. remove the if(is_numeric($c)) statement then the change from return chr($c); to return chr(ord($c)); worked for me.