WkHtmlToPdf grey border around images
Asked Answered
V

1

8

I'm creating a PDF using the Wkhtmltopdf library.

Everything is working fine, except one little detail: I overlap two images with transparent background to another background image.

This is the result:

The background image is the one with the trees and the sky, each character is in a different image with transparent background. So the result is quite perfect except for the grey border around each person.

Is it possible to remove it?

Varnish answered 6/5, 2016 at 13:16 Comment(5)
Have you found a fix for this ?Araldo
@SlimIT I noticed that the problem came out when I created the PDF on a Windows machine. Then I switched to a Ubuntu Server machine and tried to generate. The problem with border has disappeared.Varnish
I already work on Ubuntu server. Can you check what version of wkhtmltopdf do you have ? Now I have escaped the problem by converting images to jpg.Araldo
@Sebus do you have a link to your issue that's similar to this? I can almost certainly resolve this, it's probably related to the image type, but either way, I'll look at it tonight.Oxidate
No link, sorry. I have the issue with a white circle on a transparent background. Inside the white circle is the company logo. When I remove the with circle, everything looks fine.Agate
P
0

Quick fix: Load image in gimp, go to layers -> transparency -> remove alpha layer. Re-export image as PNG and try the conversion again.

Purge answered 29/12, 2020 at 18:5 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.