I managed to restyle the PDF as I need it. What I can’t get to work right now is to get the country field under the customer adres and de shortcode of the country in front of zip (GERMANY)l.
In Dolibarr if Source(From) country and Target(To) country is same then it will not display Country in address. If they are Diffrerent for example From->India , To->Germany then it will Display the country name. If you want to overcome from this then set $withCountry = 1 in pdf.lib.php. And for displaying shortcode of the country in front of zip , you may need to modify functions.lib.php file (dol_format_address function)
You have added in Source address(i.e, From address). If you want to display Customer country then you need to add $withCountry = 1 in
if ($mode == ‘target’ || preg_match(’/targetwithdetails/’,$mode))
{
…
}
and you need to add $withCountry as second parameter to dol_format_address function contained inside the if block