Create a PDF from a CHM

See About this website for notes about tips and links provided.

(This page had 5,500 views between Oct 2005 and Dec 2006 [rank: 2]; if this information helps you, consider making a small donation using PayPal - think of it as a tip!)

Software tested: Acrobat Professional 5.0, Acrobat Professional 6.0

Date created: ~2002

A client wanted to know if the CHM file could be 'printed' to PDF. I had a small CHM file (~100 topics) and knew that individual HTML pages and entire web sites can be done as PDF, but wasn't sure about a CHM. Here are the results of my testing.

  • I tried dragging and dropping the CHM file onto the Acrobat 5.0 desktop icon, but got an "unsupported file type" message.
  • From within Acrobat, I tried File > Open and File > Open Web Page - neither worked.

However, the Print option from the CHM does work, in a limited fashion. Here is the (revised) procedure for Acrobat 6.0 and some notes:

  1. Open the CHM.
  2. Select the highest level book (see Notes below).
  3. Click Print.
  4. Select the option to print this topic and all subtopics. Click OK.
  5. On the Printer dialog, select Acrobat PDF as the printer and change any settings, as required. Click OK.
  6. When asked, type the filename and location of the PDF (there may be some problems with this on some systems - see Notes below). Click OK.

Acrobat does its thing and eventually you get a PDF displayed (the time taken depends on how may topics are in the CHM).

Notes

  • If you want to print the entire CHM, you must have only ONE book set as the highest level in the CHM's Table of Contents (TOC); everything else must be under this book. Otherwise, just select the highest level you want to print from.
  • Topics are NOT separated into separate pages at the Heading 1 style - they run from one to the next. However, you can use your CSS to set these page breaks. If you use a special print CSS, its settings will apply to the printed output.
  • Bookmarks (i.e. TOC) are NOT created.
  • Hyperlinks are NOT created.
  • Despite any filename or location you may specify for the PDF, it may save as some weird name (e.g. ~Hh31edh.pdf) and be saved to the Desktop.
  • The CSS seems to be recognised - the appearance of the text, headings, hyperlinks in the PDF followed the CSS I had assigned. If you use a special print CSS, its settings will apply to the printed output.
  • HTML Help uses the headers and footers defined in Internet Explorer > File > Page Setup, so if you don't want them, check these settings first.