0

It happened alot that I want to send all of html sequence in a website, all together in a unique file so that I can read it in my ereader.

For instance this online resource can be converted to sequence of pdf files.

I don't have any limitation in OS(linux and windows) and both paid and gratis solutions are fine. An online Solution(a web site that convert) is the best.

  • Calibre does something like that, using a concept called "Recipes". No need for LaTeX with that. While I'm using Calibre for my eBooks (EPUB/MOBI), I've never used it for bundling a website as PDF, so I cannot say how well it works (hence a comment and not an answer). – Izzy Mar 6 '16 at 12:11
  • My question is how did they made the pdf I put as sample inside the question? What I like about it is when you click on a link, it will jump to a corresponding part in PDF and it doesn't open the browser. – Woeitg Mar 7 '16 at 11:08
  • Any good converter should do that. I cannot tell you about the "how" (which would go a bit too far for this site, as it's rather a development question). – Izzy Mar 7 '16 at 11:12
  • Is the "how" part is something similar to this example written in python? It inspects html code of initial page,downloads it, find the link for next page and do the previous step until it cannot download the page any more. – Woeitg Mar 7 '16 at 11:18
1

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.

  • Thanks Steve, pandoc looks an interesting program. Is it possible to give pandoc sequence of html pages (lets say a txt file that contains list of html pages) and it convert all of them in a unique pdf? or maybe I should convert each pdf seperately and combine all of them at the end? Another question: what I like about pdf I sent inside my question is that all hyperlinks are converted to hyperlinks working inside the pdf, so that if you click on link it will jump to corresponding part in pdf. Can pandoc do this? – Woeitg Mar 7 '16 at 11:06
  • Yes you can give it a sequence of html files and it can package all of the files into one pdf or epub and internal and external links are preserved although I have not tried it with multiple inputs - you can pipe a file with a list of sources but I don't think that you can read from an input list file by default. N.B. it cannot convert read pdfs so if you wished to assemble later you would need to use markdown or something rather than pdf as in intermediate. – Steve Barnes Mar 7 '16 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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