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
2
votes
1 answer

Add a header to wkhtmltoimage

I am trying to add some text the top of an html image using wkhtmltoimage. I am not sure if I am using the right argument. At the moment, I am failing with... wkhtmltoimage --custom-header helloworld http://www.google.com google.png The help file…
guyabel
  • 8,014
  • 6
  • 57
  • 86
2
votes
0 answers

How to cache asset files when batch creating thousands of PDFs using wkhtmltopdf?

We are using the excellent wkhtmltopdf to render PDFs from HTML web pages on our website. We need to render and store about 10,000 PDFs in a single batch job. This poses a problem. Gathering the JS, CSS and image assets required for every PDF via…
promethean
  • 31
  • 1
2
votes
0 answers

Executing wkhtmltoimage from PHP hangs

Executing wkhtmltoimage from PHP it just hangs. $command = 'wkhtmltoimage --format "png" "' . $url . '" "' . $output . '"'; exec($command); It hangs until PHP times out. I can run the same command from the CLI directly and it works fine. I have…
Petah
  • 45,477
  • 28
  • 157
  • 213
2
votes
1 answer

Font rendering issues with wkhtmltoimage

I have a Rails app which uses wkhtmltoimage to render an image. The font used in the image is Lucida Grande, included via inline data-uris. On my local Mac everything works just fine, but on the remote server (Ubuntu 12.10) the font just looks…
Mario Uher
  • 12,249
  • 4
  • 42
  • 68
2
votes
0 answers

wkhtmltoimage Occasionally Freezes

What steps will reproduce the problem? 1. Install/compile using scripts/static-build.sh, using "linux-local" 2. Run something like: '/usr/local/bin/wkhtmltoimage…
redrom
  • 11,502
  • 31
  • 157
  • 264
1
vote
0 answers

Custom Font rendering issue using wkhtmltoimage

I am trying to use rails ERB template to render an object in HTML and then convert it to an image using websnap (which uses wkhtmltoimage). As it happens I am using a custom font (Bello) that I installed on my mac in the HTML page and I notice that…
pwc
  • 161
  • 1
  • 10
1
vote
4 answers

wkhtmltoimage's out put is NULL

i was trying to use the wkhtmltoimage on my site but is not working here is my code for the test site
tad
  • 41
  • 2
  • 4
1
vote
0 answers

html-to-image dependency not showing vuetify icons

I am using html-to-image 1.6.2 package to convert a html page to an image. (https://www.npmjs.com/package/html-to-image) There when converting vuetify data table to an image it's pagination row have missing icons as follows. As in the above image…
Jack
  • 259
  • 4
  • 18
1
vote
0 answers

React pdf generate with jsPdf and html-to-image not working properly

const inputRef = useRef(null); const printDocument = () => { const componentWidth = Number(inputRef.current?.offsetWidth); const componentHeight = Number(inputRef.current?.offsetHeight); const orientation…
1
vote
1 answer

Angular 6 dom-to-image throws uncaught error (Can't convert html to image)

I want to convert html section into image(Note Html section has many other images from server) I am using angular 6 and node.js and library for converting html to image is dom-to-img It is working in localhost But when I test it into Production…
Tanzeel Saleem
  • 802
  • 10
  • 16
1
vote
1 answer

Problems using html-to-image in a React application

I am trying to use html-to-image to create a downloadable image of a specific html card. In its documentation it specifies to use var node = document.getElementById('my-node'); htmlToImage.toPng(node)... But this works on real DOM and not in react.…
shubham_kamath
  • 281
  • 1
  • 2
  • 11
1
vote
2 answers

Setting options in phpwkhtmltoimage

I am trying to reduce the file size of images outputted from phpwkhtmltoimage (php wrapper for wkhtmltopdf) The image is being saved fine, but the image outputted is exactly the same as having no options set. I am guessing that I am doing something…
Ryan NZ
  • 616
  • 1
  • 9
  • 25
1
vote
0 answers

wkhtmltoimage rendered only bar instead full page

I have a problem with wkhtmltoimage 12.4 and the newest alpha version. I tried to save H&M webpage, but I only get a little bar instead full webpage. I tried use many of switches to change settings but nothing works. Is there any solution for…
Algeroth
  • 785
  • 3
  • 12
  • 29
1
vote
0 answers

wkhtmltoimage Could not find the ColdFusion component or interface base

I am trying to use wkhtmltoimage with Abram Adams image.cfc. I keep getting the error "Could not find the ColdFusion component or interface base". My code is below: wkhtmltoimage = new customdesigner.com.wkhtmltoimage(binaryPath =…
SGekko
  • 335
  • 1
  • 19
1
vote
1 answer

Broken Images within phpwkhtmltopdf

Things to note, I have tested this on two different servers, Debian 9 and Ubuntu 14.04 and the same error persists. Right now I am using Ubuntu 14.04 with PHP 5, I have installed composer, I have installed both wkhtmltopdf and phpwkhtmltopdf…