Is there a way download hexdocs as pdf, epub etc?

Is there a way download hexdocs as pdf, epub etc…

This won’t answer you directly but if you have a Mac, you can use Dash. You’d be able to save docs from for offline usage and search docs. Dash is critical for me in my daily work.


$ mix docs HTML version of docs

$ mix docs --formatter epub epub version of docs

To learn more options

mix help docs


I downloaded ecto 2.2 from github. there is ex_doc already in deps. I did mix deps.get.

$ mix docs
** (Mix) The task "docs" could not be found. Did you mean "do"?

Or Zeal for Windows/Linux (same thing otherwise).

But yeah, the mix docs --formatter <blah> is to use a built in formatter to a different format.


I changed
{:ex_doc, "~> 0.17", only: :docs}, to {:ex_doc, "~> 0.17"}

now working

You can also set the environment via MIX_ENV=docs mix docs ... too. :slight_smile:

The default environment is dev.

Also, for note, by removing the only: ... then ex_docs will deploy to production with your app too, which is almost certainly not what you want.


If the project is published with the epub formatter then you can download it fro hex using the following format:

Here’s Phoenix for example:


I’ve been using Dash on OSX and now I’m trying to move to Linux full time and the one thing I’m missing in Zeal is the docsets for individual hex packages.

Did you manage to find a way to get these in a format that Zeal can consume?

1 Like

It seems like someone started working on building a hexdocs source for zeal packages, and it seems they got pretty far pretty quick. It should be possible to build something simple like that even on AWS Lambda and S3.

Also, there seem to be some packages for generating Zeal-compatible docsets from source, this seems to be the newest, but I think they need some love to be compatible with later versions of ex_doc, and so on.


Has anyone got Hexdocs successfully working with Zeal?

I was able to get my branch to generate the docsets. The pain is you have to manually import them into Zeal.