Pandoc can take one or more web pages and convert them to a number of formats including EPUB and pdf but for pdf you will also need a latex processor such as MiKTeX.
Examples:
1: Download the make manual and convert it to pdf:
pandoc -s -r html http://www.gnu.org/software/make/ -o make_manual.pdf
2: Download both the make and awk manuals and combine them into an epub:
pandoc -s -r html http://www.gnu.org/software/make/ http://www.gnu.org/software/gawk/manual/gawk.html -o make_awk_man.epub
pandoc is:
- Free, Gratis & Open Source
- Cross Platform Linux, OS-X & Windows
- Able to read, from any accessible source including online:
- commonmark, docbook, docx, epub, haddock, html, its own json, latex,
- markdown, markdown_github, markdown_mmd, markdown_phpextra,
- markdown_strict, mediawiki, native, odt, opml, org, rst, t2t,
- textile, twiki
- Able to write:
- asciidoc, beamer, commonmark, context, docbook, docx, dokuwiki,
- dzslides, epub, epub3, fb2, haddock, html, html5, icml, json,
- latex, man, markdown, markdown_github, markdown_mmd,
- markdown_phpextra, markdown_strict, mediawiki, native, odt,
- opendocument, opml, org, pdf with latex processor, plain, revealjs, rst, rtf, s5,
- slideous, slidy, texinfo, textile
- Does not need word installed to generate docx, etc.
You will find that sometime the output display and layout do not exactly match the original - especially if the original uses unusual fonts that are not installed on your system that are only displayed in your browser.
DANGER Once you start using pandoc it is hard to stop.