khtml2png2

| |
[不指定 2008/02/26 10:42 | by ipaddr ]

khtml2png2
==========

khtml2png is a command line program to create screenshots of webpages. It uses
libkhtml (the library that is used in the KDE webbrowser Konqueror) and
"convert" from the ImageMagick graphic conversion toolkit.


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


Introducing informations
========================
Extract the archive with: tar xfvz <file name>

Afterwards check the requirements and install missing development packages.


Compiling and installation
==========================
This is done with the usual three steps

 1. ./configure
 2. make
 3. make install


Static file
===========
If you have chosen the precompiled statically linked file you don't need to
install KDE or KDE librariers. Just extract the file with

 bunzip2 <file name>

and place it in a directory used for binaries (e.g. /usr/bin or /usr/local/bin).
If you like you can rename the executable.
!!! Make sure the khtml2png2 file is executable (e.g. chmod +x <file name>). !!!


Running
=======

khtml2png2 [options] url outfile

Options:
  -w, --width <width>       Width of canvas on which to render html [800]
  -h, --height <height>     Height of canvas on which to render html [1000]
  -t, --time <time>         Maximum time in seconds to spend loading page [30]
  --auto <id>               Use this option if you to autodetect the bottom/right border []
  --disable-js              Enable/Disable javascript (enabled by default)
  --disable-java            Enable/Disable java (enabled by default)
  --disable-plugins         Enable/Disable KHTML plugins (like Flash player, enabled by default)
  --disable-redirect        Enable/Disable auto-redirect by header <meta > (enabled by default)
  --disable-popupkiller     Enable/Disable popup auto-kill (enabled by default)

Example:

 khtml2png2 --width 800 --height 1000 http://www.kde.org/ kde-org.png

or

 khtml2png --auto ID_border http://www.kde.org/ kde-org.png

Net | 评论(0) | 引用(0) | 阅读(5832)