{"id":7397,"date":"2023-09-21T13:32:23","date_gmt":"2023-09-21T11:32:23","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=7397"},"modified":"2023-09-21T13:32:26","modified_gmt":"2023-09-21T11:32:26","slug":"wkhtmltopdf-webseiten-unter-linux-in-pdf-dateien-konvertieren","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/21\/wkhtmltopdf-webseiten-unter-linux-in-pdf-dateien-konvertieren\/","title":{"rendered":"wkhtmltopdf &#8211; Webseiten unter Linux in PDF-Dateien konvertieren"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Mit der Software <strong>wkhtmltopdf<\/strong> lassen sich unter Linux Webseiten ganz einfach in PDF-Dateien konvertieren und so am Rechner speichern. Die Software wird am <a rel=\"noreferrer noopener\" href=\"https:\/\/www.linux-bibel-oesterreich.at\/viewtopic.php?t=3\" target=\"_blank\">Terminal<\/a> genutzt, dies funktioniert jedoch ganz einfach. Nat\u00fcrlich finden sich auch entsprechende Add-ons f\u00fcr diverse Webbrowser &#8211; solche machen diesen jedoch nicht unbedingt schlanker und schneller &#8230;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">wkhtmltopdf installieren<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Unter auf Debian basierenden Linux-Distributionen installieren Sie diese Software ganz einfach \u00fcber die <a rel=\"noreferrer noopener\" href=\"https:\/\/www.linux-bibel-oesterreich.at\/viewtopic.php?t=10\" target=\"_blank\">Paket-Verwaltung<\/a> durch das Paket &#8222;<strong>wkhtmltopdf<\/strong>&#8222;. Alternativ finden Sie den Quellcode auf <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/wkhtmltopdf\/wkhtmltopdf\" target=\"_blank\">GitHub<\/a> zum Download.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">wkhtmltopdf nutzen<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Wie schon beschrieben wird die Software auf dem Terminal genutzt, einfacher geht es jedoch kaum. Sie kopieren die URL der Webseite aus dem Adressfeld im Webbrowser, nehmen wir jetzt ganz einfach einmal die Adresse der Linux Bibel und f\u00fcgen diese in den Befehl ein:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wkhtmltopdf https:\/\/www.linux-bibel-oesterreich.at\/ linux-bibel.pdf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Die Syntax lautet also ganz einfach:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wkhtmltopdf Adresse Dateiname.pdf<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Die zu erstellende Datei &#8211; in diesem Fall &#8222;<strong>linux-bibel.pdf<\/strong>&#8220; landet im Verzeichnis, in dem Sie sich auf dem Terminal aktuell befinden:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf.jpg\" rel=\"lightbox-0\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1024x576.jpg\" alt=\"\" class=\"wp-image-7399\" title=\"wkhtmltopdf.jpg (355.82 KiB) 1148 mal betrachtet\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Mit der eigentlichen Software landet auch eine zweite im System, mit dem Werkzeug &#8222;<strong>wkhtmltoimage<\/strong>&#8220; konvertieren Sie die Seite in eine Bilddatei &#8211; etwa als JPG:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wkhtmltoimage https:\/\/www.linux-bibel-oesterreich.at\/ linux-bibel.jpg<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1.jpg\" rel=\"lightbox-1\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1-1024x576.jpg\" alt=\"\" class=\"wp-image-7400\" title=\"wkhtmltopdf-1.jpg (357.48 KiB) 1148 mal betrachtet\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-1.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">M\u00f6chten Sie keine Farben in der PDF-Datei oder im Bild, nutzen Sie zus\u00e4tzlich die Option &#8222;<strong>-g<\/strong>&#8222;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wkhtmltopdf -g https:\/\/www.linux-bibel-oesterreich.at\/ linux-bibel.pdf<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-2.jpg\" rel=\"lightbox-2\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-2-1024x576.jpg\" alt=\"\" class=\"wp-image-7401\" title=\"wkhtmltopdf-2.jpg (337.64 KiB) 1148 mal betrachtet\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-2-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-2-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-2-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-2-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-2-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-2.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p class=\"wp-block-paragraph\">Wollen Sie Bilder nicht in den Dateien haben, nutzen Sie die Option &#8222;<strong>&#8211;no-images<\/strong>&#8222;:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wkhtmltopdf -g --no-images https:\/\/www.linux-bibel-oesterreich.at\/ linux.<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><a href=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-3.jpg\" rel=\"lightbox-3\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-3-1024x576.jpg\" alt=\"\" class=\"wp-image-7402\" title=\"wkhtmltopdf-3.jpg (258.68 KiB) 1148 mal betrachtet\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-3-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-3-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-3-150x84.jpg 150w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-3-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-3-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/wkhtmltopdf-3.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Erstver\u00f6ffentlichung: So 24. Okt 2021, 14:53<\/strong><\/p>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"7397\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"7397\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Mit der Software wkhtmltopdf lassen sich unter Linux Webseiten ganz einfach in PDF-Dateien konvertieren und so am Rechner speichern. Die Software wird am Terminal genutzt, dies funktioniert jedoch ganz einfach. Nat\u00fcrlich finden sich auch entsprechende Add-ons f\u00fcr diverse Webbrowser &#8211; solche machen diesen jedoch nicht unbedingt schlanker und schneller &#8230; wkhtmltopdf installieren Unter auf Debian [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":7403,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[654,101],"tags":[],"class_list":["post-7397","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-pdf","category-tipps"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/7397","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=7397"}],"version-history":[{"count":2,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/7397\/revisions"}],"predecessor-version":[{"id":7404,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/7397\/revisions\/7404"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/7403"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=7397"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=7397"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=7397"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}