Sometimes, in Prestashop 1.7, the invoice logo will not show in the PDF, due to Prestashop inability to locate the image.

If this happens, the way the URL is built has to be changed, and for that, it is needed to do an override of the HTMLTemplate.php class (from classes/pdf folder). The line to be changed is the following:
'logo_path' => Tools::getShopProtocol() . Tools::getMediaServer(_PS_IMG_) . _PS_IMG_ . $logo,

It has to be changed by the following:
'logo_path' => _PS_IMG_DIR_.Configuration::get('PS_LOGO', null, null, (int) $id_shop),