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?

link|improve this question
feedback

migrated from stackoverflow.com Sep 30 '11 at 13:31

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

1 Answer

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

Your Answer

 
or
required, but never shown

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