Search code examples
imagewkhtmltopdfgrayscale

wkhtmltopdf + mixed photo colors


I have a page with color and black & white images, when I use wkhtmltopdf to generate a pdf from the html file,

I get only the color images, how can I get it to print all the images, I have tried the advance options, but no success.

If I print in grayscale, then all the images are coming, but I don't want grayscale.

Any help?


Solution

  • I figured out how to solve this problem, I tried a trial-and-error method and figured out that if we provided the following parameters all the images irrespective of color or B&W, it would come up

    wkhtmltopdf --image-quality 75

    NOTE: Any value <= 75 works, higher value print a blank space for B&W images only