{"id":6902,"date":"2020-12-19T09:04:12","date_gmt":"2020-12-19T09:04:12","guid":{"rendered":"https:\/\/cpanelplesk.com\/wp62\/?p=6902"},"modified":"2021-02-05T12:05:31","modified_gmt":"2021-02-05T12:05:31","slug":"how-to-install-wkhtmltopdf-on-cpanel-centos-server","status":"publish","type":"post","link":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/","title":{"rendered":"How to Install wkhtmltopdf on cPanel\/ Centos Server"},"content":{"rendered":"<p><button class=\"main-cpanel-output\">show\/hide<\/button><br \/>\nwkhtmltopdf is an open-source command-line tool to convert HTML into PDF. It is widely used by applications to generate invoices and other pdf documents. for example, a python or PHP script will use it through its respective shell command to convert any URL to a PDF.<\/p>\n<p>The use is very easy, simple call wkhtmltopdf from the terminal with source URL and destination pdf name. for example<\/p>\n<p>If you want to capture a google doodle (whenever there is) you can the command will be<\/p>\n<p>&nbsp;<\/p>\n<div class=\"command-sh\">\n<pre>wkhtmltopdf http:\/\/google.com mydoodle.pdf<\/pre>\n<\/div>\n<p>or want to keep the current version of Twitter to save your trending tweets records,<\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">wkhtmltopdf http:\/\/twitter.com mytweets.pdf<\/div>\n<div class=\"space1\"><\/div>\n<div class=\"space1\"><\/div>\n<h2>Installing wkhtmltopdf\u00a0 on cPanel<\/h2>\n<p>Installation is pretty straight forward as would any rpm package.<\/p>\n<ol>\n<div class=\"space1\"><\/div>\n<li>\n<h3 class=\"toc-table\">Download<\/h3>\n<p>Download the appropriate version from https:\/\/wkhtmltopdf.org\/downloads.html. For sake of this article, our server is running centOS 7.9 with cPanel version v92.0.5. Please note that all downloads are currently on GitHub, so you can also browse for a specific download from there or use the links below. There are many other sources that you can found by googling it, but as a rule of thumb always go for an official source.The package also includes wkhtmltoimage (used to convert any webpage\/ URL to a number of image formats) sources and hence is named as wkhtmltox<\/li>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>wget https:\/\/github.com\/wkhtmltopdf\/packaging\/releases\/download\/0.12.6-1\/wkhtmltox-0.12.6-1.centos7.x86_64.rpm<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<div class=\"output-sh\">\n<pre>--2020-12-19 10:52:56-- https:\/\/github.com\/wkhtmltopdf\/packaging\/releases\/downl oad\/0.12.6-1\/wkhtmltox-0.12.6-1.centos7.x86_64.rpm\r\nResolving github.com (github.com)... 140.82.121.3\r\nConnecting to github.com (github.com)|140.82.121.3|:443... connected.\r\nHTTP request sent, awaiting response... 302 Found\r\nResolving github-production-release-asset-2e65be.s3.amazonaws.com (github-production-release-asset-2e65be.s3.amazonaws.com)... 52.217.45.44\r\nConnecting to github-production-release-asset-2e65be.s3.amazonaws.com (github-pr oduction-release-asset-2e65be.s3.amazonaws.com)|52.217.45.44|:443... connected.\r\nHTTP request sent, awaiting response... 200 OK\r\nLength: 14071376 (13M) [application\/octet-stream]\r\nSaving to: \u2018wkhtmltox-0.12.6-1.centos7.x86_64.rpm\u2019100%[======================================&gt;] 14,071,376 10.8MB\/s in 1.2s2020-12-19 10:52:58 (10.8 MB\/s) - \u2018wkhtmltox-0.12.6-1.centos7.x86_64.rpm\u2019 saved [14071376\/14071376]<\/pre>\n<\/div>\n<li>\n<div class=\"space1\"><\/div>\n<h3 class=\"toc-table\">Install<\/h3>\n<p>To install wkhtmltopdf RPM that we just downloaded, use the following command<\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>sudo rpm -i wkhtmltox-0.12.6-1.centos7.x86_64.rpm<\/pre>\n<\/div>\n<p><em>The -i switch is of course instructing rpm to install the package<\/em><\/p>\n<p>Or alternately you can use yum package manager, use the following command with localinstall option, instructing yum to look within the current directory for wkhtmltox RPMsudo yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm<\/li>\n<li>\n<div class=\"space1\"><\/div>\n<h3 class=\"toc-table\">Test<\/h3>\n<p>Test executable while converting the homepage of cpanelplesk.com into pdf. On WHM\/cPanel terminal window or on SSH console use following command<\/p>\n<div class=\"space1\"><\/div>\n<div class=\"command-sh\">\n<pre>\r\nwkhtmltopdf https:\/\/cpanelplesk.com\/wp62 my-favorate-webhosting-blog.pdf\r\n<\/pre>\n<\/div>\n<div class=\"space1\"><\/div>\n<div class=\"output-sh\">\n<pre>\r\nLoading pages (1\/6)\r\nCounting pages (2\/6)\r\nResolving links (4\/6)\r\nLoading headers and footers (5\/6)\r\nPrinting pages (6\/6)\r\nDone\r\n<\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<p>and wooha, Its all done<\/p>\n<div class=\"cpanel-files\"><\/div>\n<pre>The .htaccess is a hidden text file that contains some additional configuration for the websites hosted on an apache server, and it can directly affect how your website behaves in certain situations. By using .htaccess, you can rewrite the URL, Redirect your website. Password-protect your directories and disable access from a spec<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>show\/hide wkhtmltopdf is an open-source command-line tool to convert HTML into PDF. It is widely used by applications to generate invoices and other pdf documents. for example, a python or PHP script will use it through its respective shell command to convert any URL to a PDF. The use is very easy, simple call wkhtmltopdf [&#8230;]<\/p>\n<p><a class=\"understrap-read-more-link\" href=\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/\">Continue Reading&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,14],"tags":[],"class_list":["post-6902","post","type-post","status-publish","format-standard","hentry","category-cpanel","category-linux"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Install wkhtmltopdf on cPanel\/ Centos Server - cPanel Plesk<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"How to Install wkhtmltopdf on cPanel\/ Centos Server - cPanel Plesk\" \/>\n<meta name=\"twitter:description\" content=\"show\/hide wkhtmltopdf is an open-source command-line tool to convert HTML into PDF. It is widely used by applications to generate invoices and other pdf documents. for example, a python or PHP script will use it through its respective shell command to convert any URL to a PDF. The use is very easy, simple call wkhtmltopdf [...]Continue Reading...\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Farooq Omer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/\"},\"author\":{\"name\":\"Farooq Omer\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"headline\":\"How to Install wkhtmltopdf on cPanel\/ Centos Server\",\"datePublished\":\"2020-12-19T09:04:12+00:00\",\"dateModified\":\"2021-02-05T12:05:31+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/\"},\"wordCount\":314,\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"articleSection\":[\"Cpanel\",\"Linux\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/\",\"name\":\"How to Install wkhtmltopdf on cPanel\/ Centos Server - cPanel Plesk\",\"isPartOf\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\"},\"datePublished\":\"2020-12-19T09:04:12+00:00\",\"dateModified\":\"2021-02-05T12:05:31+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cpanelplesk.com\/wp62\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install wkhtmltopdf on cPanel\/ Centos Server\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#website\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/\",\"name\":\"cPanel Plesk\",\"description\":\"Blog on famous hosting control panels\",\"publisher\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13\",\"name\":\"Farooq Omer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"contentUrl\":\"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png\",\"width\":300,\"height\":44,\"caption\":\"Farooq Omer\"},\"logo\":{\"@id\":\"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/\"},\"url\":\"https:\/\/cpanelplesk.com\/wp62\/author\/fokado\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install wkhtmltopdf on cPanel\/ Centos Server - cPanel Plesk","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/","twitter_card":"summary_large_image","twitter_title":"How to Install wkhtmltopdf on cPanel\/ Centos Server - cPanel Plesk","twitter_description":"show\/hide wkhtmltopdf is an open-source command-line tool to convert HTML into PDF. It is widely used by applications to generate invoices and other pdf documents. for example, a python or PHP script will use it through its respective shell command to convert any URL to a PDF. The use is very easy, simple call wkhtmltopdf [...]Continue Reading...","twitter_misc":{"Written by":"Farooq Omer","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/#article","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/"},"author":{"name":"Farooq Omer","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"headline":"How to Install wkhtmltopdf on cPanel\/ Centos Server","datePublished":"2020-12-19T09:04:12+00:00","dateModified":"2021-02-05T12:05:31+00:00","mainEntityOfPage":{"@id":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/"},"wordCount":314,"publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"articleSection":["Cpanel","Linux"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/","url":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/","name":"How to Install wkhtmltopdf on cPanel\/ Centos Server - cPanel Plesk","isPartOf":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#website"},"datePublished":"2020-12-19T09:04:12+00:00","dateModified":"2021-02-05T12:05:31+00:00","breadcrumb":{"@id":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cpanelplesk.com\/wp62\/cpanel\/how-to-install-wkhtmltopdf-on-cpanel-centos-server\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cpanelplesk.com\/wp62\/"},{"@type":"ListItem","position":2,"name":"How to Install wkhtmltopdf on cPanel\/ Centos Server"}]},{"@type":"WebSite","@id":"https:\/\/cpanelplesk.com\/wp62\/#website","url":"https:\/\/cpanelplesk.com\/wp62\/","name":"cPanel Plesk","description":"Blog on famous hosting control panels","publisher":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cpanelplesk.com\/wp62\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/c78ae1cf9451a09592fb9697d69c0c13","name":"Farooq Omer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/","url":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","contentUrl":"https:\/\/cpanelplesk.com\/wp62\/wp-content\/uploads\/2020\/11\/cpanelplesk.png","width":300,"height":44,"caption":"Farooq Omer"},"logo":{"@id":"https:\/\/cpanelplesk.com\/wp62\/#\/schema\/person\/image\/"},"url":"https:\/\/cpanelplesk.com\/wp62\/author\/fokado\/"}]}},"_links":{"self":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/6902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/comments?post=6902"}],"version-history":[{"count":0,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/posts\/6902\/revisions"}],"wp:attachment":[{"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/media?parent=6902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/categories?post=6902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelplesk.com\/wp62\/wp-json\/wp\/v2\/tags?post=6902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}