Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting CHM file to another format [closed]

Tags:

chm

I need to convert a chm file to another format, most likely pdf or html. I have tried chm2pdf and other converters but they all do horrific jobs at conversion. Even using a program like htmldoc doesn't do a very good job at converting to html.

Is there a way to just print each page of the chm file or taking a image of it and then saving that image to the pdf or other format.

The main reason for this is that chm books are filled with code and conversion tools don't format anything correctly.

like image 621
Recursion Avatar asked Dec 29 '22 07:12

Recursion


1 Answers

I'm afraid that will be a multi-step procedure...

  1. Extract the pages from the CHM file, e.g. using arCHMage.
  2. Use wkhtmltopdf on each page.
  3. Use something like pdfjoin (from pdfjam) to tape the documents together.

This complements the answer recommending a virtual to-PDF printer in that it's the more linuxy command line solution (all of the tools mentioned are available in Debian's and Ubuntu's package repository). Pick your poison. ;)

like image 181
Jan Krüger Avatar answered Mar 08 '23 11:03

Jan Krüger