I use a modified version of the Crabe-PDF -PHP, in which I use, among other things, Extrafield from the Invoices module. It works very well and is not difficult.
Unfortunately, this does not work with Extrafield from the “Partner” module (third party)
The following is available in PHP:
The entry:
require_once DOL_DOCUMENT_ROOT. '/ core / class / extrafields.class.php';
Second, you need to ensure you are looking at the “right” options. I mean, in crabe, $object normally relates to the invoice, while customer data are in $object->thirdparty (unless you want to load them apart).
Third, convToOutputCharset is a function taking the string as an argument to convert it as the right character set.