{"id":1960,"date":"2010-01-19T10:21:19","date_gmt":"2010-01-19T15:21:19","guid":{"rendered":"http:\/\/g33kinfo.com\/info\/?p=1960"},"modified":"2010-01-19T10:21:19","modified_gmt":"2010-01-19T15:21:19","slug":"convert-chm-to-pdf","status":"publish","type":"post","link":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/","title":{"rendered":"Convert CHM to PDF"},"content":{"rendered":"<h3>How to convert CHM to PDF in Linux<\/h3>\n<p>1. Install dependencies by running the following command in the terminal:<br \/>\n<code><br \/>\nsudo apt-get install htmldoc libchm-bin python-chm<br \/>\n<\/code><br \/>\n2. Next, download chm2pdf by clicking <u><a href=\"http:\/\/chm2pdf.googlecode.com\/files\/chm2pdf-0.9.1.tar.gz\">here<\/a><\/u> or using wget<br \/>\n<code><br \/>\nwget http:\/\/chm2pdf.googlecode.com\/files\/chm2pdf-0.9.1.tar.gz<br \/>\n<\/code><br \/>\n3. Now extract the downloaded file.<br \/>\n<code><br \/>\ntar -xzvf chm2pdf-0.9.1.tar.gz<br \/>\n<\/code><br \/>\n4. Browse to the folder you extracted and run:<br \/>\n<code><br \/>\ncd pdf-0.9.1<br \/>\nsudo python setup.py install<br \/>\n<\/code><\/p>\n<p>Now on the command line, type:<br \/>\n<code><br \/>\nchm2pdf [options] input_filename [output_filename]<br \/>\n<\/code><br \/>\n<\/p>\n<h3>chm2pdf examples<\/h3>\n<p>Unstructured HTML files inside the CHM file, use of &#8211;webpage option &#8211; produces my-file.pdf:<br \/>\n<code><br \/>\nchm2pdf --webpage my-file.chm<br \/>\n<\/code><br \/>\nStructured HTML files:<br \/>\n<code><br \/>\nchm2pdf --book my-file.chm<br \/>\n<\/code><br \/>\nStructured HTML files, produce a table of contents page automatically (&#8211;title option):<br \/>\n<code><br \/>\nchm2pdf --book --title my-file.chm<br \/>\n<\/code><br \/>\nStructured HTML files, produce a table of contents page automatically (&#8211;title option), add a \u201ctitlepage\u201d as found in the toc.html file inside the CHM:<br \/>\n<code><br \/>\nchm2pdf --book --title --titlefile toc.html my-file.chm<br \/>\n<\/code><br \/>\nIf the file \u201ctoc.html\u201d is not found, a warning will be issued and the option will be ignored &#8211; just browse the (very verbose) output of chm2pdf to see that warning if you suspect you mispelled the titlefile name.<\/p>\n<p>Like above, now with an explicitly set page size and maximum compression level for the resulting PDF:<br \/>\n<code><br \/>\nchm2pdf --book --title --titlefile toc.html --size 177.8\u00d7233.3mm --compression 9 my-file.chm<br \/>\n<\/code><br \/>\nLike above, but name the PDF \u201cyour-file.pdf\u201d:<br \/>\n<code><br \/>\nchm2pdf --book --title --titlefile toc.html --size 177.8\u00d7233.3mm --compression 9 my-file.chm your-file.pdf<br \/>\n<\/code><br \/>\nA very interesting option (and one that is not htmldoc-specific, but is pure chm2pdf-specific) is the &#8211;extract-only option:<br \/>\n<code><br \/>\nchm2pdf --extract-only my-file.chm<br \/>\n<\/code><br \/>\nwill extract the contents of my-file.chm (all the HTML and other, \u201cspecial\u201d, files inside the CHM) into the directory CHM2PDF_TEMP_ORIG_DIR\/my-file. Thus, if CHM2PDF_TEMP_ORIG_DIR has its default value \u201c\/tmp\/chm2pdf\/orig\u201d, chm2pdf will extract the file into \/tmp\/chm2pdf\/orig\/my-file and stop. <\/p>\n<p>You can then examine the extracted files at your pace. They will be overwritten next time you call chm2pdf with the same file(name).<\/p>\n<p>If you want to know more available options use the following command from your terminal<br \/>\n<code><br \/>\nchm2pdf --help<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to convert CHM to PDF in Linux 1. Install dependencies by running the following command in the terminal: sudo apt-get install htmldoc libchm-bin python-chm 2. Next, download chm2pdf by clicking here or using wget wget http:\/\/chm2pdf.googlecode.com\/files\/chm2pdf-0.9.1.tar.gz 3. Now extract the downloaded file. tar -xzvf chm2pdf-0.9.1.tar.gz 4. Browse to the folder you extracted and run:&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[],"class_list":["post-1960","post","type-post","status-publish","format-standard","hentry","category-info"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Convert CHM to PDF - Linux Shtuff<\/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:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Convert CHM to PDF - Linux Shtuff\" \/>\n<meta property=\"og:description\" content=\"How to convert CHM to PDF in Linux 1. Install dependencies by running the following command in the terminal: sudo apt-get install htmldoc libchm-bin python-chm 2. Next, download chm2pdf by clicking here or using wget wget http:\/\/chm2pdf.googlecode.com\/files\/chm2pdf-0.9.1.tar.gz 3. Now extract the downloaded file. tar -xzvf chm2pdf-0.9.1.tar.gz 4. Browse to the folder you extracted and run:... Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/\" \/>\n<meta property=\"og:site_name\" content=\"Linux Shtuff\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:author\" content=\"https:\/\/fb.me\/g33kinf0\" \/>\n<meta property=\"article:published_time\" content=\"2010-01-19T15:21:19+00:00\" \/>\n<meta name=\"author\" content=\"g33kadmin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/drsinger1111\" \/>\n<meta name=\"twitter:site\" content=\"@drsinger1111\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/\"},\"author\":{\"name\":\"g33kadmin\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"headline\":\"Convert CHM to PDF\",\"datePublished\":\"2010-01-19T15:21:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/\"},\"wordCount\":289,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"articleSection\":[\"General Info\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/\",\"name\":\"Convert CHM to PDF - Linux Shtuff\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\"},\"datePublished\":\"2010-01-19T15:21:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/convert-chm-to-pdf\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Convert CHM to PDF\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#website\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/\",\"name\":\"Linux Shtuff\",\"description\":\"Because I have CRS Syndrome...\",\"publisher\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/#\\\/schema\\\/person\\\/c022e4c40b13ea1b678e6f020756f547\",\"name\":\"g33kadmin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"url\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"contentUrl\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\",\"width\":512,\"height\":512,\"caption\":\"g33kadmin\"},\"logo\":{\"@id\":\"https:\\\/\\\/g33kinfo.com\\\/info\\\/wp-content\\\/uploads\\\/2022\\\/07\\\/minion-researchA.gif\"},\"description\":\"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\\\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....\",\"sameAs\":[\"https:\\\/\\\/thelinuxreport.com\",\"https:\\\/\\\/fb.me\\\/g33kinf0\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/drsinger1111\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Convert CHM to PDF - Linux Shtuff","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:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/","og_locale":"en_US","og_type":"article","og_title":"Convert CHM to PDF - Linux Shtuff","og_description":"How to convert CHM to PDF in Linux 1. Install dependencies by running the following command in the terminal: sudo apt-get install htmldoc libchm-bin python-chm 2. Next, download chm2pdf by clicking here or using wget wget http:\/\/chm2pdf.googlecode.com\/files\/chm2pdf-0.9.1.tar.gz 3. Now extract the downloaded file. tar -xzvf chm2pdf-0.9.1.tar.gz 4. Browse to the folder you extracted and run:... Read More","og_url":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/","og_site_name":"Linux Shtuff","article_publisher":"https:\/\/fb.me\/g33kinf0","article_author":"https:\/\/fb.me\/g33kinf0","article_published_time":"2010-01-19T15:21:19+00:00","author":"g33kadmin","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/drsinger1111","twitter_site":"@drsinger1111","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/#article","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/"},"author":{"name":"g33kadmin","@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"headline":"Convert CHM to PDF","datePublished":"2010-01-19T15:21:19+00:00","mainEntityOfPage":{"@id":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/"},"wordCount":289,"commentCount":0,"publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"articleSection":["General Info"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/","url":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/","name":"Convert CHM to PDF - Linux Shtuff","isPartOf":{"@id":"https:\/\/g33kinfo.com\/info\/#website"},"datePublished":"2010-01-19T15:21:19+00:00","breadcrumb":{"@id":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/g33kinfo.com\/info\/convert-chm-to-pdf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/g33kinfo.com\/info\/"},{"@type":"ListItem","position":2,"name":"Convert CHM to PDF"}]},{"@type":"WebSite","@id":"https:\/\/g33kinfo.com\/info\/#website","url":"https:\/\/g33kinfo.com\/info\/","name":"Linux Shtuff","description":"Because I have CRS Syndrome...","publisher":{"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/g33kinfo.com\/info\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/g33kinfo.com\/info\/#\/schema\/person\/c022e4c40b13ea1b678e6f020756f547","name":"g33kadmin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","url":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","contentUrl":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif","width":512,"height":512,"caption":"g33kadmin"},"logo":{"@id":"https:\/\/g33kinfo.com\/info\/wp-content\/uploads\/2022\/07\/minion-researchA.gif"},"description":"I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com\/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....","sameAs":["https:\/\/thelinuxreport.com","https:\/\/fb.me\/g33kinf0","https:\/\/x.com\/https:\/\/twitter.com\/drsinger1111"]}]}},"_links":{"self":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/1960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/comments?post=1960"}],"version-history":[{"count":0,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/posts\/1960\/revisions"}],"wp:attachment":[{"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/media?parent=1960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/categories?post=1960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/g33kinfo.com\/info\/wp-json\/wp\/v2\/tags?post=1960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}