Questions tagged [wkhtmltoimage]

wkhtmltoimage is a program capable of converting HTML documents into images.

Description

Simple shell utility to convert html to pdf using the webkit rendering engine, and qt. Introduction

Searching the web, I have found several command line tools that allow you to convert a HTML-document to a PDF-document, however they all seem to use their own, and rather incomplete rendering engine, resulting in poor quality. Recently QT 4.4 was released with a WebKit widget (WebKit is the engine of Apples Safari, which is a fork of the KDE KHtml), and making a good tool became very easy.

http://code.google.com/p/wkhtmltopdf/issues/list?q=label:wkhtmltoimage

via http://code.google.com/p/wkhtmltopdf/

116 questions
3
votes
1 answer

wkhtmltoimage does not show gridlines of highcharts graph

I'm using symfony to generate a simple highcharts graph, but wkhtmltoimage does not show the gridlines properly: My knp_snappy.image config is the following: options: encoding: UTF-8 format: svg width:…
Luca Galasso
  • 161
  • 6
3
votes
1 answer

Html To Image Using NReco.ImageGenerator : C#

Introduction I am working with the functionality where we can convert "html" to image.For image creation, i use "Image" function(of System.Drawing). Functionality working fine(including html styles etc) except for one thing i will describe later …
3
votes
1 answer

Generate Image and PDF with custom fonts using wkhtmltoimage and wkhtmltopdf (Linux centos6 64-bit, hostgator )

I am stuck to generate image using wkhtmltoimage with my custom fonts. OS Linux CentOs 64-bit wkhtmltoimage and wkhtmltopdf version is 0.11.0_rc1-static-amd64 Example of Expected Result: and My OUTPUT is: You can test this link: After…
akash varlani
  • 320
  • 1
  • 4
  • 16
2
votes
0 answers

what support does wkhtmltoimage have for colour profiles

On a page converted to an image with wkhtmltoimage: If images on the page contain colour profiles (sRGB, for example), will the profiles be taken into account in the rendered image? If images on the page contain multiple embedded colour profiles…
Mike Trpcic
  • 25,305
  • 8
  • 78
  • 114
2
votes
1 answer

Angular 11 - how to convert html to jpeg image

I tried using following code const element = document.getElementbyId('myid'); // it takes little long to render htmlToImage.jpeg(element, { quality: 0.95 }) .then((dataUrl) => { console.log(dataUrl); // this prints only data:, }) As…
yog
  • 199
  • 1
  • 2
  • 20
2
votes
2 answers

python imgkit could not render the whole page

I what to render this HTML page into jpg: but wkhtmltoimage seems to only render the small part of the page. what's wrong with my code? My code: import imgkit map0 = folium.Map(location=Center,tiles='Stamen…
Wenjing Li
  • 105
  • 6
2
votes
1 answer

How to convert an HTML String to PDF using wkhtmltopdf or wkhtmltoImage in Java?

I am using wkhtmltoPDF to generate pdf from html string and It works fine for me as expected, but now I have to generate output as Image and I'm unable to find sample code or any library. I have referred …
Deva
  • 1,851
  • 21
  • 22
2
votes
1 answer

Font size too small when rendering with wkhtmltoimage

My goal is to render text into an image. I'd like the layout and size to be static and the font size to adjust to how much text is to be rendered. My tool of choice is wkhtmltoimage 0.12.5, the idea being that this way I can make use of the many css…
Sandro
  • 453
  • 1
  • 5
  • 19
2
votes
1 answer

wkhtmltopdf and MathJax: equations are rendered too small

I am trying to download the Feynman lectures using wkhtmltopdf. This is the command line that I use: wkhtmltopdf.exe http://www.feynmanlectures.caltech.edu/I_44.html --javascript-delay 20000 --no-stop-slow-scripts ./out/I_44.pdf However the MathJAX…
robertspierre
  • 3,218
  • 2
  • 31
  • 46
2
votes
1 answer

htmlToImage Chrome 64 SecurityError: Failed to read the 'cssRules' property from 'CSSStyleSheet': Cannot access rules

The new Chrome 64 security update seems to have broken the htmlToImage libraries. None of the styling is correctly calculated and is rendered as if no styling was applied at all. Does anyone know of a workaround / fix? Do I need to put my CSS on…
mcottingham
  • 1,926
  • 2
  • 18
  • 28
2
votes
2 answers

Wrong Font rendering wkhtmltopdf

we are using wkhtmltopdf and wkhtmltoimage the latest version (0.12.3). And got a problem with the "Frutiger Neue LT W1G Bold" font. It does work on all normal browsers but after creating a image or pdf with the above mentioned libraries it renders…
Pomm0
  • 209
  • 5
  • 11
2
votes
0 answers

wkhtmltoimage not working on Polymer website

I'm trying to capture an image of a website using wkhtmltoimage. It is not working for webpages built using Polymer. For example, wkhtmltoimage https://elements.polymer-project.org/browse?package=google-web-components aaa.jpg leaves me with a long…
wogsland
  • 9,106
  • 19
  • 57
  • 93
2
votes
2 answers

Html Render to Image (C#/Net) WITHOUT using WebBrowser

I have html string/document (if you view source any web page in the IE browser, the resulting html code) stored in the database and I need to convert this html to an image using C#/.Net wcf service. The current code is using WebBrowser and it works…
SJamal
  • 55
  • 1
  • 7
2
votes
1 answer

Using wkhtmltoimage from wkhtmltopdf

I read in their documentation that wkhtmltoimage is inside wkhtmltopdf, so I installed wkhtmltopdf using apt-get, because that's the only way I could get all dependencies working. Now I can use wkhtmltopdf, but when I use wkhtmltoimage, I keep…
Karol Hernik
  • 133
  • 7
2
votes
1 answer

wkhtmltoimage - sometimes get entire page, sometimes not

$command = "/usr/local/bin/wkhtmltoimage --quality 70 --crop-w 800 --crop-x 50 --javascript-delay 900 --height 800"; Hello, i've finished simple script to convert any url to jpg via wkhtmltoimage im using this for facebook, but sometimes it works…
user2657362