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
0
votes
0 answers

html2canvas - need to ignore elements during the initial DOM scan

I think html2canvas is scanning the whole DOM and reading the video data, which causes them to start playing aloud. I need it to skip the video elements, as (1) they should not be playing sound, and (2) this is hurting performance, especially on…
0
votes
0 answers

Why imgkit in python convert HTML code to a blank image

Use imgkit to convert HTML to an image I am trying to convert html document embedded with Konva.js code to imgkit in python flask. Html code is working fine in browser. But I'm getting blank image in python. import imgkit # HTML code that contains…
0
votes
0 answers

Generate PDF from specific CSS class WKHTMLTOPDF

Is it possible to generate PDF from specific CSS class html with WKHTMLTOPDF? I need to capture just specific class not for all page Example :
...
Ray Coder
  • 1,022
  • 3
  • 15
  • 30
0
votes
0 answers

Using imgkit to convert hindi content HTML to image

I am converting an HTML string HTML, CSS and JavaScript demo
ANURAG BISHT
  • 373
  • 3
  • 7
0
votes
0 answers

How to fix CROSS Error in AWS S3 ( React JS )

I need your help! Now I working in one project for my company! here I face one issue ( cross error from aws s3 ) below you can see the images. This application connects an image in AWS s3 to a user image using html-to-image npm. This causes the…
0
votes
0 answers

How to import module in JS using Import?

I am trying to import a library in JS but it won't work. I am getting this error message : Uncaught TypeError: Failed to resolve module specifier "html-to-image". Relative references must start with either "/", "./", or "../". Here is my code in my…
0
votes
1 answer

Wkhtmltopdf is not generating Signature with CSS "float : left" in

tag, which is displaying in HTML

I am converting HTML to pdf using wkhtmltopdf tool version 0.12.6-1 (with patched QT). HTML contains so-ordinates to generate Signature at last. When I load HTML in browser, it displays Signature, but when I convert HTML to pdf using wkhtmltopdf…
Chirag Shah
  • 353
  • 1
  • 13
0
votes
0 answers

python does not recognize no-background option in imgkit

I want to get an image of html elements with no background. this code below does it but it does adding white background. (I have images as elements there so I cant just remove the white background.): import imgkit kitoptions = { # some random…
Idan Rotbart
  • 93
  • 1
  • 5
0
votes
1 answer

How to send piped response in Next.js API using wkhtmltoimage?

I'm new to Next.js, and I'm trying to use wkhtmltoimage but I can't seem to send the generated image stream as a response in my Next.js API. const fs = require('fs') const wkhtmltoimage = require('wkhtmltoimage').setCommand(__dirname +…
Bwrites
  • 103
  • 1
  • 3
0
votes
0 answers

Using Python and imgkit, the output is not as expected based on html rendered in browser

I am using imgkit and html/css to make tables containing data from a dataframe. The html/css I have looks as it should when rendered in a browser, but the image rendered by imgkit has horizontal gaps in row 3 and in the green background. imgkit…
Mary
  • 35
  • 5
0
votes
0 answers

sending e-mail with base64 image using a page result

I want to send an image of a page output (html + css) as an e-mail. I wrote the code below for this, e-mail is sent but the image cannot be displayed in body. where am I doing wrong? can you please help? public ActionResult Index() { …
sdm
  • 33
  • 4
0
votes
1 answer

wkhtmltopdf won't display jpg images

I'm having a bit of a problem with wkhtmltopdf. It won't display jpg images but works perfectly with png images. I've tried converting the images to base64 and inserting them directly into my html. When i render the html it works, but it won't when…
LyesB
  • 1
  • 1
0
votes
1 answer

Convert HTML to PNG with width dependent on content locally

I need to convert HTML documents into PNGs depending on their content. The HTML documents contain an image with some styling dependent on the size of the image/document. I've spent forever looking into and trying solutions but none fit my needs well…
reticivis
  • 489
  • 2
  • 7
  • 13
0
votes
1 answer

Image from html not rendered while converting it into JPG - IMGKit gem

I want to convert an HTML page into JPG image using IMGKit gem and wkhtmltoimage-binary, In my HTML page, there is a div class whose background is an image (styled inline), While converting this HTML page, the div background image is not rendered…
0
votes
0 answers

How to fix SVG color gradient rendering in wkhtmltopdf

Problem When I put a standard SVG into wkhtmltopdf, it renders beautifully, just like in a browser. However when I add a color gradient to the SVG (like with ), then it creates a terribly choppy and pixelated line along the edge of…