Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a lot of HTML files (webpages, saved with FireFox as one <filename>.html file and a <filename>_files directory with statics). How can i compress them into one large PDF file with just Linux command-line?

Note: each file has its own encoding. For example, some files could be encoded with UTF-8 while the others are encoded with latin-1.

I've found the htmldoc utilite, but it does not supports UTF-8 encoding (at least, the version from apt-get repos). So the question becomes this:

how can i (with or without changing files' encodings) compress them to the one large PDF file?

share|improve this question

migrated from Sep 30 '11 at 13:31

This question came from our site for professional and enthusiast programmers.

  1. Use iconv to convert encoding from UTF-8
  2. Use htmldoc to convert HTML to PDF
  3. Use pdftk to merge PDFs
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.