alyf-de / erpnext_druckformate

ERPNext-Druckformate nach DIN 5008
GNU General Public License v3.0
30 stars 19 forks source link

Letter Head Logo on PDF #1

Closed majubewi closed 3 years ago

majubewi commented 3 years ago

If we try to get a PDF by pressing: image

It doesn't print the company logo: image

I have tried a workaround to pull the logo from the default company letter head with jinja but yet I haven't found a solution. If done with this fixes URLs in <img src="/files/..." work but <img src="{{ company.company_logo }}" does not.

Not urgent cause we can "Print" and then save as pdf file in the OS printing menu, but would be nice to have fixed someday.

barredterra commented 3 years ago

Did you upload the logo in your Company master? Possibly the file needs to be public.

company_logo

majubewi commented 3 years ago

Just checked the file, it is public and it is in the company master. What Version of wkhtmltopdf have you installed currently?

barredterra commented 3 years ago

wkhtmltopdf 0.12.5 (with patched qt)

barredterra commented 3 years ago

Maybe a problem with the file format? We're using .png, I could imagine that there are problems with .svg, for exmaple.

barredterra commented 3 years ago

Do you have this problem only with Quotation or with the other formats as well?

Please make sure that the field company_logo of you Company master contains something like "/files/YOUR_LOGO.png" and the file really exists at that location.

majubewi commented 3 years ago

Okay, I have the same version of wkhtmltopdf. This is from the API representation of the company master, the png file exists. image

To clarify: The logo is shown in the preview, just not in the PDF Version

majubewi commented 3 years ago

@barredterra If you want we can have a look at it on my setup. Write me a PM in discuss.erpnext.com

barredterra commented 3 years ago

@canlann please provide detailed instructions how to reproduce the issue on a vanilla ERPNext instance. The company logo get's displayed correctly on all of our deployments.

barredterra commented 3 years ago

You could also log into your ERPNext server via SSH and check if you are able to download the logo from there (for example, wget https://my.erpnext.com/files/logo.png). Possibly the server cannot find the image at the given location because of some wrong configuration.

majubewi commented 3 years ago

@barredterra Hey, I did just reset everything and now the logo is being displayed. I don't know what exactly my mistake was.