EN

Copying sources and texts (also in parts) for publishing without our permission is NOT ALLOWED. We are fed up with finding our work on other sites (like stackoverflow).

Copying for private and non-public usage is allowed.

DE

Das Kopieren von Quellcode und Texten (auch in Auszügen) ist nicht erlaubt. Wir haben es gründlich satt, unsere Arbeit auf anderen Webseiten zu finden.

Das private Kopieren und Benutzen ist natürlich erlaubt.

Raspberry Pi: "wkHTMLtoPDF" installieren

Das Tool "wkhtmltopdf" ("wk HTML to PDF") erlaubt es, per Script auf Bash-Ebene aus HTML Daten PDF Dateien zu erzeugen. Das Projekt ist OpenSource.

Um das Tool auf dem RaspberryPi zu installieren, folgen Sie dieser kruezn Anleitung:

Geben Sie den Installationsbefehl ein:

sudo apt-get install wkhtmltopdf

Folgen Sie den Anweisungen und bestätigen Sie die Rückfrage mit "y" zum Installieren:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  adwaita-icon-theme at-spi2-core fontconfig fontconfig-config fonts-dejavu-core geoclue-2.0 gstreamer1.0-plugins-base gtk-update-icon-cache hicolor-icon-theme iio-sensor-proxy libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data
  libatspi2.0-0 libavahi-client3 libavahi-glib1 libcairo-gobject2 libcairo2 libcdparanoia0 libcolord2 libcroco3 libcups2 libdatrie1 libdouble-conversion1 libdrm-amdgpu1 libdrm-common libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl-mesa0
  libegl1 libepoxy0 libevdev2 libfontconfig1 libfontenc1 libgbm1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgl1 libgl1-mesa-dri libglapi-mesa libgles2 libglvnd0 libglx-mesa0 libglx0 libgraphite2-3
  libgstreamer-plugins-base1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz0b libhyphen0 libice6 libinput-bin libinput10 libjbig0 liblcms2-2 libllvm9 libmtdev1 libnotify4 libogg0 libopus0 liborc-0.4-0 libpango-1.0-0
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpcre2-16-0 libpixman-1-0 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5 libqt5svg5 libqt5webchannel5
  libqt5webkit5 libqt5widgets5 libqt5xmlpatterns5 librest-0.7-0 librsvg2-2 librsvg2-common libsensors-config libsensors5 libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtheora0 libtiff5 libunwind8 libvisual-0.4-0
  libvorbis0a libvorbisenc2 libwacom-bin libwacom-common libwacom2 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwayland-server0 libwebp6 libwoff1 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-icccm4
  libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxcomposite1 libxcursor1 libxdamage1
  libxfixes3 libxfont2 libxi6 libxinerama1 libxkbcommon-x11-0 libxkbcommon0 libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxslt1.1 libxt6 libxtst6 libxxf86vm1 notification-daemon qt5-gtk-platformtheme
  qttranslations5-l10n x11-common x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xnest xserver-common
Suggested packages:
  gvfs colord cups-common libvisual-0.4-plugins liblcms2-utils opus-tools qt5-image-formats-plugins qtwayland5 qt5-qmltooling-plugins librsvg2-bin lm-sensors
The following NEW packages will be installed:
  adwaita-icon-theme at-spi2-core fontconfig fontconfig-config fonts-dejavu-core geoclue-2.0 gstreamer1.0-plugins-base gtk-update-icon-cache hicolor-icon-theme iio-sensor-proxy libatk-bridge2.0-0 libatk1.0-0 libatk1.0-data
  libatspi2.0-0 libavahi-client3 libavahi-glib1 libcairo-gobject2 libcairo2 libcdparanoia0 libcolord2 libcroco3 libcups2 libdatrie1 libdouble-conversion1 libdrm-amdgpu1 libdrm-common libdrm-nouveau2 libdrm-radeon1 libdrm2 libegl-mesa0
  libegl1 libepoxy0 libevdev2 libfontconfig1 libfontenc1 libgbm1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-bin libgdk-pixbuf2.0-common libgl1 libgl1-mesa-dri libglapi-mesa libgles2 libglvnd0 libglx-mesa0 libglx0 libgraphite2-3
  libgstreamer-plugins-base1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libharfbuzz0b libhyphen0 libice6 libinput-bin libinput10 libjbig0 liblcms2-2 libllvm9 libmtdev1 libnotify4 libogg0 libopus0 liborc-0.4-0 libpango-1.0-0
  libpangocairo-1.0-0 libpangoft2-1.0-0 libpcre2-16-0 libpixman-1-0 libqt5core5a libqt5dbus5 libqt5gui5 libqt5network5 libqt5positioning5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5sensors5 libqt5svg5 libqt5webchannel5
  libqt5webkit5 libqt5widgets5 libqt5xmlpatterns5 librest-0.7-0 librsvg2-2 librsvg2-common libsensors-config libsensors5 libsm6 libsoup-gnome2.4-1 libsoup2.4-1 libthai-data libthai0 libtheora0 libtiff5 libunwind8 libvisual-0.4-0
  libvorbis0a libvorbisenc2 libwacom-bin libwacom-common libwacom2 libwayland-client0 libwayland-cursor0 libwayland-egl1 libwayland-server0 libwebp6 libwoff1 libx11-xcb1 libxaw7 libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-icccm4
  libxcb-image0 libxcb-keysyms1 libxcb-present0 libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util0 libxcb-xfixes0 libxcb-xinerama0 libxcb-xkb1 libxcomposite1 libxcursor1 libxdamage1
  libxfixes3 libxfont2 libxi6 libxinerama1 libxkbcommon-x11-0 libxkbcommon0 libxkbfile1 libxmu6 libxpm4 libxrandr2 libxrender1 libxshmfence1 libxslt1.1 libxt6 libxtst6 libxxf86vm1 notification-daemon qt5-gtk-platformtheme
  qttranslations5-l10n wkhtmltopdf x11-common x11-xkb-utils xfonts-base xfonts-encodings xfonts-utils xnest xserver-common
0 upgraded, 157 newly installed, 0 to remove and 57 not upgraded.
Need to get 85.9 MB of archives.
After this operation, 754 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Warten Sie die Installation ab.

Jetzt können HTML Dateien per Bash in PDF Dateien konvertiert werden:

wkhtmltopdf test.html test.pdf
Loading page (1/2)
Printing pages (2/2)                                               
Done

OpenSource: Link zum Quelltext

Keine Kommentare Kommentar schreiben

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

fünf × eins =