Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
347 Vistas

For some reason the image of the logo of company is not appearing in the pdf when I download it, even though it is set in the design of the document.

Avatar
Descartar
Mejor respuesta

Hi,


Make sure your base URL is correctly set in system parameters (web.base.url). If it's set to localhost or an internal IP, wkhtmltopdf won’t be able to load images like the logo. Set it to your actual domain, such as https://yourcompany.com.


Verify that the company logo is properly uploaded under Settings > Companies > Your Company. It should be present in the Report Header Logo section. Even if it shows on the screen, it might not be saved or may have been removed during an update.


Convert the logo to a PNG format with a resolution of around 300–500 pixels wide and a size under 200 KB. Large files or non-standard formats (like SVG or TIFF) can prevent the image from rendering correctly in PDF.


Ensure the environment can access the image URL used in the PDF. Relative paths won’t work; the image needs to be accessed through the full base URL. If the image link doesn’t resolve externally, it won’t appear in the PDF.


Open the HTML preview of the report in your browser, right-click the logo area, and copy the image address. Paste that in a private browser tab. If the image fails to load, it's inaccessible to wkhtmltopdf too.


Restart your Odoo server or rebuild the branch on Odoo.sh. Sometimes template or cache issues can cause updates or settings to not reflect properly in PDF generation.


Hope it helps.

Avatar
Descartar