khtml2png logo

Support this FFII project in its fight against software patents
> About

> FAQ

> Download

> Links

> Help wanted

> Support / Contact

Rote Karte für Internetschnüffler!

Counter

261084

Sponsored by
www.SourceForge.net logo
www.sourceforge.net

Welcome to khtml2png

khtml as basis for rendering websites is a bit outdated nowadays. If you want to create screenshots of websites you should have a look at python-webkit2png and the guide "Making web pages screenshots with webkit2png (flash included)".

khtml2png is a command line program to create screenshots of webpages. It uses libkhtml (the library that is used in the KDE webbrowser Konqueror). In khtml2png 2.0.5 to 2.5.0 "convert" from the ImageMagick graphic conversion toolkit is used to create the output files in various image file formats. 2.6.0 and future development will use the built-in conversion of the Qt library.

Caution

khtml2png relies on a working and stable KDE 3.5.X base. Some distributions don't have these basis and let khtml2png crash, hang and produce other problems. Please install Debian 5 Lenny, if you notice this behaviour.

Features

There are two branches of khtml2png: An old 1.0.x branch containing the original code from Simon MacMullen (the former developer and maintainer of khtml2png) and a new 2.x done by the new maintainer Hauke Goos-Habermann. The branches have different features whereas 1.0.x is outdated and will not run correctly on newer KDE versions (newer than 3.2 if I remember correctly). The 2.6.0 release was improved very much by Florent Bruneau.

Take this table as a short feature overview:
Feature 1.0.x 2.0.5 - 2.5.0 2.6.0 - newer
Scale output image X O O
Works with KDE 3.2 and newer O X X
Make screeshots longer than your screen height X X X
Make screeshots wider than your screen width O X X
Use a HTML element in the page to figure out the screenshot size O X X
Different output file formats O Oall supported by ImageMagick Oall supported by the system's Qt library

Requirements

For running and compiling you need some libraries and tools. You can find the Debian package names in braces.
  • g++
  • KDE 3.x
  • kdelibs for KDE 3.x (kdelibs4-dev)
  • zlib (zlib1g-dev)
  • cmake
Screenshot from the mass installation step 4 of the m23 administration interface made with khtml2png 2.x and automatic size detection.

Have fun!



Screenshot from the welcome text of the m23 administration interface made with khtml2png 2.x and automatic size detection.

News

2012-12-27 khtml2png is outdated
khtml as basis for rendering websites is a bit outdated nowadays. If you want to create screenshots of websites you should have a look at python-webkit2png and the guide "Making web pages screenshots with webkit2png (flash included)".
2010-08-17 New version 2.7.7
new: Now has an extra delay to ensure that the page is completely loaded even on slow pages and connections (Devon H. O'Dell)
2008-10-21 New option in version 2.7.6
new: This version adds a --get-body switch that tries to detect the size of the markup. (Florent)
2008-05-04 Fixed Debian package
fix: The Debian packages contained the source files and not the compiled binary. A fixed Debian package was uploaded.
2008-04-18 Khtml2png 2.7.5 with improved size detection of huge screenshots
This release was improved by Florent Bruneau
cha: Fixed problems with screenshots of very big webpages that showed gray bars
2007-12-03 New options in new version 2.7.0
This release was improved by Florent Bruneau and Floren Munteanu.
new: Options to allow the user to scale the size of the output image independently to the size of the screenshot.
new: Option to allow creation of a screenshot without drawing the rendering window (but in this case, the buttons are not correctly rendered).
fix: makeTar.sh: Now includes debian directory to build Debian packages (Hauke)
2007-07-19 Added FAQ
Added a page with frequently asked questions.
2007-06-27 New version 2.6.7
This release was improved by Alex Osborne
cha: Decreased CPU load.
cha: Added timeout option for loading pages.
2007-06-04 New version 2.6.5
This release was improved by Florent Bruneau.
fix: Now produces screenshots on my Debian Etch system under KDE 3.5.5 without glitches.
fix: Maybe better working on other systems too. Please test.
2007-03-13 New version 2.6.0
This release was highly improved by Florent Bruneau.
cha: Remove dependence on ImageMagick and use Qt to do exactly the same thing (Florent)
fix: Fix buffer overflow vulnerabilities (Florent)
fix: Fix a code injection vulnerability (Florent)
cha: Auto-kill QMessageBox (so the program no more needs user interactions in the X session)
cha: Removed as much as possible of duplicated code. (Florent)
fix: Fix some issues I met on very large screenshots. (Florent)
cha: Concluding code aligning, function descriptions, programm information. (Hauke)
2006-07-03 New version 2.5.0
cha: Now waits until the page loading is finished before the screenshot is made.
cha: Now with checking for the size of the HTML page to avoid making screenshots bigger than the HTML page.
cha: "flash-delay" isn't needed any more.
new: Now with CMake configuring script.
2006-01-11 New version 2.0.5
fix: Fixed a crash (thx jydelort)
fix: Fixed endless loop occurring while capturing some sites (thx jydelort)
cha: INSTALL includes compiling instructions for Mandriva now.
2005-11-18 New version 2.0.2
fix: Now scrolling in X and Y direction should work without duplicating parts of the image.
cha: Setting the khtml2png window to borderless isn't needed any more.
new: makeTarRelease.sh: Makes a tar.gz file that contains the source of khtml2png
new: uploadTar.sh: Uploads the tar to SF
2005-11-17 Fix in the khtml2png 2.0.1 package
There was a problem with the configure script. Inside from KDevelop 3.3 configuration and compiling worked well but
not from plain command line. Now there is a new khtml2png 2.0.1 package with a fixed configure script that checks for
missing dependencies.
2005-11-15 Initial site and source files for khtml2png 2.x uploaded
Today starts the new web site for khtml2png.