Questions tagged [imgkit]

Library that allows JPG images to be created using plain HTML+CSS.

Create JPGs using plain old HTML+CSS. Uses wkhtmltoimage on the backend which renders HTML using Webkit.

Heavily based on PDFKit.

Homepage

57 questions
5
votes
1 answer

How to add custom font into imglyKit SDK in iOS with Swift?

I have tried the following code for adding custom fonts into imglyKit SDK but no custom font is added. I have also put .ttf file into info.plist file as a resource. let sampleImage = image.image let configuration = Configuration() {…
Subhash Khimani
  • 427
  • 7
  • 22
4
votes
1 answer

How to give fingerprint css path in production rails 4

I am using imgkit to take snapshot of my webpage. I run: RAILS_ENV=production bundle exec rake assets:precompile To precompile my assets. All file of app/assets directory are compiled to public/assets application.css compiled as…
Anish Shah
  • 333
  • 1
  • 14
4
votes
1 answer

IMGKit convert HTML to PNG of a specific part of the HTML

I haven't been able to find this in the docs, so that's why I am asking here. Is it possible to tell IMGKit to convert a specific part of the HTML? I just want the PNG of a specific container. So, if my HTML markup looks like…
Hommer Smith
  • 26,772
  • 56
  • 167
  • 296
4
votes
1 answer

Getting imgkit + paperclip + s3 to work. Paperclip isn't recognizing "snapshot"

EDIT: One problem was I need to do r = Resource.where(id: 3).first #<== I didn't have the .first before I'm attempting to get snapshots of URLs by using imgkit + paperclip + s3. I am able to get the snapshots, and successfully upload them to…
Foolish Chap
  • 765
  • 1
  • 5
  • 19
3
votes
1 answer

Img Kit to create multiple image sizes in rails

Hi I have a small app that shares a png of an image using img kit. These images are for social, so i would like to create multiple image versions for example a 1080 X 1080 version for instagram & a 1240 X 644 for LinkedIn. The question I am asking…
Joe Bloggos
  • 889
  • 7
  • 24
3
votes
0 answers

--javascript-delay for doing a screenshot using imgkit and Python

Using Python, imgkit and wkhtmltopdf (2.0) library I'm trying to make a screenshoot for the whole page. After some preparation I'm calling a method make_screenshot: def make_screenshot(url): options = { 'format': 'png', …
Dax
  • 59
  • 7
3
votes
0 answers

IMGKit displays blank image

My application has an activities database, and I'm trying to use IMGKit to render the show view of an activity as an image file that can be then used on other platforms. I feel like I've implemented IMGKit properly, but all I'm getting is a blank…
Jim
  • 41
  • 4
3
votes
1 answer

(Rails) IMGKIT - Issues in exporting images with html and css

I'm using IMGKIT in one of my projects and had to use their css with html option to satisfy a requirment. I noticed that if stylesheets are set as follows: kit = IMGKit.new(html, :quality => 50) kit.stylesheets << '/path/to/css/file' and the…
random
  • 10,238
  • 8
  • 57
  • 101
2
votes
0 answers

How to properly extract and include images when converting PPT to PDF using Python?

This code is a Python function that takes a PowerPoint file (ppt_file) and converts it into a PDF file using several third-party libraries and Python built-in modules. Here is what the code does step-by-step: First, it creates a temporary file with…
2
votes
1 answer

How to set wkhtmltoimage path when using imgkit in google colab?

Im trying to save an html file as an image using imgkit in google colab. Im having trouble making it work. !pip install imgkit !pip install wkhtmltopdf import imgkit imgkit.from_file('file.html', 'out.jpg') Error: No wkhtmltoimage executable…
Ignacio Basti
  • 97
  • 2
  • 10
2
votes
1 answer

Python pip installation

I have the python version 3.8.5 installed + pip. Now I would like to install the package imgkit from pypi with pip install imgkit. And this happens: WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after…
Dani
  • 41
  • 2
  • 4
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
2 answers

(using 'imgkit' on Ubuntu server) wkhtmltopdf: could not connect to any X display

I have a python script running on a remote Ubuntu server. At some point in my code, I create an HTML file which I then convert to a png. I therefore elected to use imgkit, which does the job beautifully well (I tested my code on my Mac OS before…
Berti1989
  • 185
  • 1
  • 14
2
votes
0 answers

dataframe to_html with images

The source of the code comes from here I have two versions of code, test_a.html not showing images and test_b.html showing images.I want the 1st version to work but seems like the def is not working well. How can I make the 1st version work with…
Hachi
  • 179
  • 14
2
votes
0 answers

Python imgkit make a screenshot on specific div block

I have troubles with creating screenshots using imgkit. I can easily make a screenshot full site, but I don't know how to screenshot only specific div block in html. I'm totally noob in html, I don't think it is good idea to learn it for one python…
AnImperialMan
  • 33
  • 1
  • 5
1
2 3 4